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>
This commit is contained in:
Niels de Vos 2012-10-02 09:45:56 +02:00 committed by Anand Avati
parent 4efddca755
commit 22fdadad06
2 changed files with 2 additions and 2 deletions

View File

@ -51,7 +51,7 @@ function sighup_samba () {
then
kill -HUP $pid;
else
/etc/init.d/smb start
/etc/init.d/smb condrestart
fi
}

View File

@ -50,7 +50,7 @@ function sighup_samba () {
then
kill -HUP $pid;
else
/etc/init.d/smb start
/etc/init.d/smb condrestart
fi
}