From 9816fe18e839eb195a6f4482311b65df995b920f Mon Sep 17 00:00:00 2001 From: Meghana Madhusudhan Date: Tue, 26 Aug 2014 16:40:49 +0530 Subject: 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 Reviewed-on: http://review.gluster.org/8385 Tested-by: Gluster Build System Reviewed-by: Vijay Bellur --- extras/hook-scripts/set/post/S30samba-set.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'extras/hook-scripts/set/post/S30samba-set.sh') 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 -- cgit