summaryrefslogtreecommitdiffstats
path: root/extras/ganesha/scripts/dbus-send.sh
diff options
context:
space:
mode:
authorJoe Julian <jjulian@io.com>2015-09-08 09:53:54 -0700
committerKaleb KEITHLEY <kkeithle@redhat.com>2015-09-29 11:18:59 -0700
commit6667478cdba920d2658bba2edc99c8f8cc33e271 (patch)
treee08bb669370398a69e3a21446b0422b92dcb89d5 /extras/ganesha/scripts/dbus-send.sh
parentbb61acbda8e92b84e8f0b827bdc369a838dd978c (diff)
common-ha: distribution neutral location of config files
work on systems with config files in directories other than /etc/sysconfig. BUG: 1251821 Change-Id: Ie8e0a330810430cbc92499181ab60d79ea43c8f1 Signed-off-by: Joe Julian <me@joejulian.name> Reviewed-on: http://review.gluster.org/12132 Tested-by: NetBSD Build System <jenkins@build.gluster.org> Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: soumya k <skoduri@redhat.com> Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com>
Diffstat (limited to 'extras/ganesha/scripts/dbus-send.sh')
-rwxr-xr-xextras/ganesha/scripts/dbus-send.sh23
1 files changed, 16 insertions, 7 deletions
diff --git a/extras/ganesha/scripts/dbus-send.sh b/extras/ganesha/scripts/dbus-send.sh
index 4840be830d6..d390e1a2dc7 100755
--- a/extras/ganesha/scripts/dbus-send.sh
+++ b/extras/ganesha/scripts/dbus-send.sh
@@ -1,11 +1,25 @@
#/bin/bash
+# Try loading the config from any of the distro
+# specific configuration locations
+if [ -f /etc/sysconfig/ganesha ]
+ then
+ . /etc/sysconfig/ganesha
+fi
+if [ -f /etc/conf.d/ganesha ]
+ then
+ . /etc/conf.d/ganesha
+fi
+if [ -f /etc/default/ganesha ]
+ then
+ . /etc/default/ganesha
+fi
+
declare -i EXPORT_ID
GANESHA_DIR=${1%/}
OPTION=$2
VOL=$3
CONF=
-CONFFILE=
function find_rhel7_conf
{
@@ -24,14 +38,9 @@ function find_rhel7_conf
done
}
-cfgline=$(grep ^CONFFILE= /etc/sysconfig/ganesha)
-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
+ find_rhel7_conf $OPTIONS
fi