diff options
| -rwxr-xr-x | extras/hook-scripts/set/post/S30samba-set.sh | 5 | ||||
| -rwxr-xr-x | extras/hook-scripts/set/post/S31ganesha-set.sh | 20 | 
2 files changed, 16 insertions, 9 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 diff --git a/extras/hook-scripts/set/post/S31ganesha-set.sh b/extras/hook-scripts/set/post/S31ganesha-set.sh index b09a3942a8e..f839aa37061 100755 --- a/extras/hook-scripts/set/post/S31ganesha-set.sh +++ b/extras/hook-scripts/set/post/S31ganesha-set.sh @@ -3,6 +3,7 @@ PROGNAME="Sganesha-set"  OPTSPEC="volname:,gd-workdir:"  VOL=  declare -i EXPORT_ID +ganesha_key="FALSE"  GANESHA_DIR="/var/lib/glusterfs-ganesha"  CONF1="$GANESHA_DIR/nfs-ganesha.conf"  GANESHA_LOG_DIR="/var/log/nfs-ganesha/" @@ -13,7 +14,6 @@ host_name="none"  LOC=""  GLUSTERD_WORKDIR= -  function parse_args ()  {          ARGS=$(getopt -l $OPTSPEC  -o "o" -name $PROGNAME $@) @@ -34,12 +34,14 @@ function parse_args ()                      for pair in $@; do                          read key value < <(echo "$pair" | tr "=" " ")                          case "$key" in -                            "nfs-ganesha.enable") -                                enable_ganesha=$value -                                ;; -                            "nfs-ganesha.host") -                                host_name=$value -                                ;; +                          "nfs-ganesha.enable") +                                    enable_ganesha=$value +                                    ganesha_key="TRUE" +                                    ;; +                          "nfs-ganesha.host") +                                    host_name=$value +                                    ganesha_key="TRUE" +                                    ;;                              *)                                  ;;                          esac @@ -257,6 +259,10 @@ function stop_ganesha()  }          parse_args $@ +        if [ "$ganesha_key" == "FALSE" ] +        then +                exit 0 +        fi          check_ganesha_dir $VOL          if echo $enable_ganesha | grep -q -i "ON"                  then  | 
