[Pkg-samba-maint] r1087 - trunk

Steve Langasek vorlon at debian.org
Tue Jun 20 22:29:20 UTC 2006


Thanks for committing this, the patch looks very good in general, but:

On Tue, Jun 20, 2006 at 04:35:35PM +0000, Peter Eisentraut wrote:

> Modified: trunk/winbind.init
> ===================================================================
> --- trunk/winbind.init	2006-06-20 09:48:40 UTC (rev 1086)
> +++ trunk/winbind.init	2006-06-20 16:35:19 UTC (rev 1087)
> @@ -18,37 +18,41 @@
>  
>  . /lib/lsb/init-functions
>  
> +
> +d_start() {
> +	mkdir -p /var/run/samba/winbindd_privileged || return 1
> +	chgrp winbindd_priv /var/run/samba/winbindd_privileged/ || return 1
> +	chmod 0750 /var/run/samba/winbindd_privileged/ || return 1
> +	start-stop-daemon --start --quiet --oknodo --exec $DAEMON -- $WINBINDD_OPTS
> +}
> +
> +
> +d_stop() {
> +	start-stop-daemon --stop --quiet --oknodo --exec $DAEMON
> +}
> +
> +
>  case "$1" in
>  	start)
>  		log_daemon_msg "Starting the Winbind daemon" "winbind"
> -
> -		start-stop-daemon --start --quiet --exec $DAEMON -- $WINBINDD_OPTS
> -
> +		d_start
>  		log_end_msg $?
>  		;;
>  
>  	stop)
>  		log_daemon_msg "Stopping the Winbind daemon" "winbind"
> -
> -		start-stop-daemon --stop --quiet --oknodo --exec $DAEMON
> -
> +		d_stop
>  		log_end_msg $?
>  		;;
>  
>  	restart|force-reload)
>  		log_daemon_msg "Restarting the Winbind daemon" "winbind"
> -
> -		start-stop-daemon --stop --quiet --oknodo --exec $DAEMON
> -		sleep 2
> -		start-stop-daemon --start --quiet --exec $DAEMON -- $WINBINDD_OPTS
> -
> +		d_start && sleep 2 && d_stop
>  		log_end_msg $?
>  		;;
> +
>  	*)
>  		echo "Usage: /etc/init.d/winbind {start|stop|restart|force-reload}"
>  		exit 1
>  		;;
>  esac
> -
> -exit 0
> -

Yuck.  Is this really necessary?

- Why is this init script not set -e?
- Why does "restart" not just call /etc/init.d/winbind stop followed by
  /etc/init.d/winbind start, which would avoid any code duplication without
  introducing tacky shell functions?

-- 
Steve Langasek                   Give me a lever long enough and a Free OS
Debian Developer                   to set it on, and I can move the world.
vorlon at debian.org                                   http://www.debian.org/



More information about the Pkg-samba-maint mailing list