View | Details | Raw Unified | Return to bug 57310 | Differences between
and this patch

Collapse All | Expand All

(-)a/etc/init.d/samba-ad-dc (-2 / +7 lines)
Lines 77-86 Link Here
77
		log_daemon_msg "Stopping $DESC" $NAME
77
		log_daemon_msg "Stopping $DESC" $NAME
78
		## sometimes samba takes a long time to terminate,
78
		## sometimes samba takes a long time to terminate,
79
		## which would make starting new samba processes fail.
79
		## which would make starting new samba processes fail.
80
		pids=$(pgrep -F "$PIDFILE"; pgrep --exact '(smbd|winbindd)')
80
		pid_samba=$(pgrep -F "$PIDFILE")
81
		pid_smbd=$(pgrep --exact 'smbd')
82
		pid_winbindd=$(pgrep --exact 'winbindd')
81
		start-stop-daemon --stop --quiet --pidfile $PIDFILE --name samba
83
		start-stop-daemon --stop --quiet --pidfile $PIDFILE --name samba
82
		ret="$?"
84
		ret="$?"
83
		if [ -n "$pids" ]; then
85
		[ -n "$pid_smbd" ] && start-stop-daemon --stop --quiet --pid $pid_smbd --name smbd
86
		[ -n "$pid_winbindd" ] && start-stop-daemon --stop --quiet --pid $pid_winbindd --name winbindd
87
		pids="$pid_samba $pid_smbd $pid_winbindd"
88
		if [ -n "${pids// /}" ]; then
84
			unset pgids kgids
89
			unset pgids kgids
85
			for pid in $pids; do
90
			for pid in $pids; do
86
				pgids="$pgids -g $pid"
91
				pgids="$pgids -g $pid"

Return to bug 57310