[Pkg-samba-maint] r1111 - trunk

Peter Eisentraut petere at costa.debian.org
Mon Aug 7 14:57:07 UTC 2006


Author: petere
Date: 2006-08-07 14:57:07 +0000 (Mon, 07 Aug 2006)
New Revision: 1111

Modified:
   trunk/winbind.init
Log:
Simplify winbind init script and fix restart logic thinko.


Modified: trunk/winbind.init
===================================================================
--- trunk/winbind.init	2006-08-07 12:40:08 UTC (rev 1110)
+++ trunk/winbind.init	2006-08-07 14:57:07 UTC (rev 1111)
@@ -18,37 +18,26 @@
 
 . /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"
-		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
+
 		log_end_msg $?
 		;;
 
 	stop)
 		log_daemon_msg "Stopping the Winbind daemon" "winbind"
-		d_stop
+		start-stop-daemon --stop --quiet --oknodo --exec $DAEMON
 		log_end_msg $?
 		;;
 
 	restart|force-reload)
-		log_daemon_msg "Restarting the Winbind daemon" "winbind"
-		d_start && sleep 2 && d_stop
-		log_end_msg $?
+		$0 stop && sleep 2 && $0 start
 		;;
 
 	*)




More information about the Pkg-samba-maint mailing list