diff options
author | Meghana Madhusudhan <mmadhusu@redhat.com> | 2014-08-26 16:40:49 +0530 |
---|---|---|
committer | Vijay Bellur <vbellur@redhat.com> | 2014-08-31 11:05:04 -0700 |
commit | 9816fe18e839eb195a6f4482311b65df995b920f (patch) | |
tree | 24d06bb0b4cb7da9413672915dbe97af3a99b72f /extras/hook-scripts/set/post/S30samba-set.sh | |
parent | f52efa681b1a16c287ed00e2a79cc7f05e65fed1 (diff) |
Hook scripts should exit with correct exit status.
When volume set options other than nfs-ganesha.host and nfs-ganesha.enable
are executed, the hook script S31ganesha-set.sh should exit with
exit status 0. The present behaviour results in an error message in
one of the logs that could be misleading.
Similarly, hook script S30samba-set.sh should exit with
exit status 0 if samba is not installed. Fixing the issue
with a minor change in the script.
Change-Id: I35d1dc8400bb7043385800ed97adc5321829437f
BUG: 1122978
Signed-off-by: Meghana Madhusudhan <mmadhusu@redhat.com>
Reviewed-on: http://review.gluster.org/8385
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
Diffstat (limited to 'extras/hook-scripts/set/post/S30samba-set.sh')
-rwxr-xr-x | extras/hook-scripts/set/post/S30samba-set.sh | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/extras/hook-scripts/set/post/S30samba-set.sh b/extras/hook-scripts/set/post/S30samba-set.sh index 9153dcd0bb2..4bac61f48a1 100755 --- a/extras/hook-scripts/set/post/S30samba-set.sh +++ b/extras/hook-scripts/set/post/S30samba-set.sh @@ -115,16 +115,17 @@ if [ "0" = $(is_volume_started "$VOL") ]; then exit 0 fi -#Find smb.conf, smbd pid directory and smbd logfile path -find_config_info if [ "$enable_smb" = "enable" ]; then + #Find smb.conf, smbd pid directory and smbd logfile path + find_config_info if ! grep --quiet "\[gluster-$VOL\]" /etc/samba/smb.conf ; then add_samba_share $VOL sighup_samba fi elif [ "$enable_smb" = "disable" ]; then + find_config_info del_samba_share $VOL sighup_samba fi |