summaryrefslogtreecommitdiffstats
path: root/extras/hook-scripts
diff options
context:
space:
mode:
authorNiels de Vos <ndevos@redhat.com>2012-10-02 09:45:56 +0200
committerAnand Avati <avati@redhat.com>2012-10-02 01:18:13 -0700
commit22fdadad060aacaede110ce4f1fd678481baaa0f (patch)
tree0c589c5564b28a5ca74983ed5b980b37a9741924 /extras/hook-scripts
parent4efddca7551a3a443fdc37de4062a641e05cd2b2 (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: I93408050a65445d98d2f9bb61992e216e04e0b04 BUG: 861506 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>
Diffstat (limited to 'extras/hook-scripts')
-rwxr-xr-xextras/hook-scripts/S30samba-start.sh2
-rwxr-xr-xextras/hook-scripts/S30samba-stop.sh2
2 files changed, 2 insertions, 2 deletions
diff --git a/extras/hook-scripts/S30samba-start.sh b/extras/hook-scripts/S30samba-start.sh
index a42bb07eba8..75336e6b496 100755
--- a/extras/hook-scripts/S30samba-start.sh
+++ b/extras/hook-scripts/S30samba-start.sh
@@ -51,7 +51,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/S30samba-stop.sh b/extras/hook-scripts/S30samba-stop.sh
index 0e483bff835..f96847309ae 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
}