From 22fdadad060aacaede110ce4f1fd678481baaa0f Mon Sep 17 00:00:00 2001 From: Niels de Vos Date: Tue, 2 Oct 2012 09:45:56 +0200 Subject: extras: hook scripts should not start Samba if it is not running If the smb service was turned off by the administrator, the hook scripts should not start the service on starting/stopping a volume. By calling the service script with "condrestart" instead of plain "start", the service script checks if samba actually was running. Change-Id: I93408050a65445d98d2f9bb61992e216e04e0b04 BUG: 861506 Signed-off-by: Niels de Vos Reviewed-on: http://review.gluster.org/4015 Reviewed-by: Amar Tumballi Tested-by: Gluster Build System Reviewed-by: Anand Avati --- extras/hook-scripts/S30samba-stop.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'extras/hook-scripts/S30samba-stop.sh') diff --git a/extras/hook-scripts/S30samba-stop.sh b/extras/hook-scripts/S30samba-stop.sh index 0e483bff8..f96847309 100755 --- a/extras/hook-scripts/S30samba-stop.sh +++ b/extras/hook-scripts/S30samba-stop.sh @@ -50,7 +50,7 @@ function sighup_samba () { then kill -HUP $pid; else - /etc/init.d/smb start + /etc/init.d/smb condrestart fi } -- cgit