diff options
author | Niels de Vos <ndevos@redhat.com> | 2012-10-02 09:45:56 +0200 |
---|---|---|
committer | Vijay Bellur <vbellur@redhat.com> | 2012-10-10 01:10:02 -0400 |
commit | e6cb04fa1647111457d2e7cbf6cac8bb584b96d9 (patch) | |
tree | a40d25a89cac3fbaa5cb35726b7ce01a6c9129f5 | |
parent | 81376bf77541bcd2f1e85fb0375938c2dd0a16ea (diff) |
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 <ndevos@redhat.com>
Reviewed-on: http://review.gluster.org/4015
Reviewed-by: Amar Tumballi <amarts@redhat.com>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Anand Avati <avati@redhat.com>
Reviewed-on: https://code.engineering.redhat.com/gerrit/59
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
Tested-by: Vijay Bellur <vbellur@redhat.com>
-rw-r--r-- | extras/hook-scripts/start/post/S30samba-start.sh | 2 | ||||
-rw-r--r-- | extras/hook-scripts/stop/pre/S30samba-stop.sh | 2 |
2 files changed, 2 insertions, 2 deletions
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 } |