From e6cb04fa1647111457d2e7cbf6cac8bb584b96d9 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: I6ad8519ff1f344450e569f9de7adc1e61da2c498 BUG: 863907 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 Reviewed-on: https://code.engineering.redhat.com/gerrit/59 Reviewed-by: Vijay Bellur Tested-by: Vijay Bellur --- extras/hook-scripts/start/post/S30samba-start.sh | 2 +- extras/hook-scripts/stop/pre/S30samba-stop.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'extras') diff --git a/extras/hook-scripts/start/post/S30samba-start.sh b/extras/hook-scripts/start/post/S30samba-start.sh index b61c59cd3b5..5323cca76d5 100644 --- a/extras/hook-scripts/start/post/S30samba-start.sh +++ b/extras/hook-scripts/start/post/S30samba-start.sh @@ -37,7 +37,7 @@ function sighup_samba () { then kill -HUP $pid; else - /etc/init.d/smb start + /etc/init.d/smb condrestart fi } diff --git a/extras/hook-scripts/stop/pre/S30samba-stop.sh b/extras/hook-scripts/stop/pre/S30samba-stop.sh index 83659e4ff4f..66efa3cc5ae 100644 --- a/extras/hook-scripts/stop/pre/S30samba-stop.sh +++ b/extras/hook-scripts/stop/pre/S30samba-stop.sh @@ -55,7 +55,7 @@ function sighup_samba () { then kill -HUP $pid; else - /etc/init.d/smb start + /etc/init.d/smb condrestart fi } -- cgit