summaryrefslogtreecommitdiffstats
path: root/extras/ganesha/scripts/dbus-send.sh
diff options
context:
space:
mode:
Diffstat (limited to 'extras/ganesha/scripts/dbus-send.sh')
-rwxr-xr-xextras/ganesha/scripts/dbus-send.sh31
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()