From 993001dadf3b1706816b7762749a4c4426ac86df Mon Sep 17 00:00:00 2001 From: Raghavendra Talur Date: Thu, 8 Aug 2013 03:19:43 +0530 Subject: extras/hook-scripts: Don't add multiple entries in smb.conf When volume is force started, there may be entry in smb.conf for that volume. Always check for entry before adding one. Change-Id: I44f893174a993abaa31c24c1a81bb38a58617808 BUG: 994727 Signed-off-by: Raghavendra Talur Reviewed-on: http://review.gluster.org/5526 Reviewed-by: Anand Avati Tested-by: Anand Avati --- extras/hook-scripts/S30samba-start.sh | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'extras') diff --git a/extras/hook-scripts/S30samba-start.sh b/extras/hook-scripts/S30samba-start.sh index 926fe6035..e281c7e54 100755 --- a/extras/hook-scripts/S30samba-start.sh +++ b/extras/hook-scripts/S30samba-start.sh @@ -85,5 +85,7 @@ if [ $(get_smb "$VOL") = "disable" ]; then exit 0 fi -add_samba_share $VOL -sighup_samba +if ! grep --quiet "gluster-$VOL" /etc/samba/smb.conf ; then + add_samba_share $VOL + sighup_samba +fi -- cgit