diff options
author | Meghana M <mmadhusu@redhat.com> | 2015-07-09 03:34:07 +0530 |
---|---|---|
committer | Kaleb KEITHLEY <kkeithle@redhat.com> | 2015-07-10 10:41:17 -0700 |
commit | 23a004d37ba624970f4d6cf9bde694f403397af7 (patch) | |
tree | c72de88780c00a4564d0e40ae21d840eea1674a0 /extras/ganesha/scripts/dbus-send.sh | |
parent | decf3c9fe0d4f1f636e337aa313694251341b685 (diff) |
NFS-Ganesha : Export fails on RHEL 7.1
We grep for CONFFILE parameter in "/etc/syconfig/ganesha"
file to find out the path of the ganesha config file.
In RHEL 7.1, this parameter does not exist in the file and
we can't find out the ganesha config file. Export
fails invariably due to this. Changing this pattern to
a more generic one and default it to "/etc/ganesha/ganesha.conf"
This patch is a backport of the fix merged upstream,
http://review.gluster.org/#/c/11594/
Change-Id: Ia0f87f964a5771b97d9077f17a0387d7a01e02b6
BUG: 1241885
Signed-off-by: Meghana Madhusudhan <mmadhusu@redhat.com>
Reviewed-on: http://review.gluster.org/11621
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com>
Diffstat (limited to 'extras/ganesha/scripts/dbus-send.sh')
-rwxr-xr-x | extras/ganesha/scripts/dbus-send.sh | 31 |
1 files changed, 30 insertions, 1 deletions
diff --git a/extras/ganesha/scripts/dbus-send.sh b/extras/ganesha/scripts/dbus-send.sh index d838cabf7b2..4840be830d6 100755 --- a/extras/ganesha/scripts/dbus-send.sh +++ b/extras/ganesha/scripts/dbus-send.sh @@ -4,8 +4,37 @@ declare -i EXPORT_ID GANESHA_DIR=${1%/} OPTION=$2 VOL=$3 +CONF= +CONFFILE= + +function find_rhel7_conf +{ + while [[ $# > 0 ]] + do + key="$1" + case $key in + -f) + CONFFILE="$2" + break; + ;; + *) + ;; + esac + shift + done +} + cfgline=$(grep ^CONFFILE= /etc/sysconfig/ganesha) -eval $(echo ${cfgline} | grep -F CONFFILE=) +eval $(echo ${cfgline} | grep -F ^CONFFILE=) + +if [ -z $CONFFILE ] + then + cfgline=$(grep ^OPTIONS= /etc/sysconfig/ganesha) + eval $(echo ${cfgline} | grep -F ^OPTIONS=) + find_rhel7_conf $cfgline + +fi + CONF=${CONFFILE:-/etc/ganesha/ganesha.conf} function check_cmd_status() |