From 319d07b1d315669a02842815c0d2aa130094fff0 Mon Sep 17 00:00:00 2001 From: Tom Eastep Date: Wed, 4 Apr 2012 09:24:48 -0700 Subject: [PATCH] Remove more absolute path names Signed-off-by: Tom Eastep --- Shorewall-core/lib.cli | 6 ++++-- Shorewall/lib.cli-std | 7 ++++++- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/Shorewall-core/lib.cli b/Shorewall-core/lib.cli index a4d9243df..4b462ca8e 100644 --- a/Shorewall-core/lib.cli +++ b/Shorewall-core/lib.cli @@ -859,12 +859,14 @@ show_command() { echo "VARDIR=$VARDIR" echo "LIBEXEC=$g_libexec" echo "SBINDIR=$g_sbindir" + echo "CONFDIR=${CONFDIR}" [ -n "$g_lite" ] && [ ${VARDIR} != /var/lib/$g_program ] && echo "LITEDIR=${VARDIR}" else echo "Default CONFIG_PATH is $CONFIG_PATH" echo "Default VARDIR is /var/lib/$g_program" echo "LIBEXEC is $g_libexec" echo "SBINDIR is $g_sbindir" + echo "CONFDIR is ${CONFDIR}" [ -n "$g_lite" ] && [ ${VARDIR} != /var/lib/$g_program ] && echo "LITEDIR is ${VARDIR}" fi ;; @@ -1126,8 +1128,8 @@ do_dump_command() { echo "$g_product $SHOREWALL_VERSION Dump at $g_hostname - $(date)" echo - if [ $g_family -eq 6 ] && [ -f /usr/share/shorewall/version ]; then - echo " Shorewall $(cat /usr/share/shorewall/version)" + if [ $g_family -eq 6 ] && [ -f ${SHAREDIR}/shorewall/version ]; then + echo " Shorewall $(cat ${SHAREDIR}/shorewall/version)" echo fi show_status diff --git a/Shorewall/lib.cli-std b/Shorewall/lib.cli-std index 28486f161..e44633f9b 100644 --- a/Shorewall/lib.cli-std +++ b/Shorewall/lib.cli-std @@ -1308,6 +1308,8 @@ reload_command() # $* = original arguments less the command. root=root local libexec libexec=/usr/share + local confdir + confdir=/etc litedir=/var/lib/${g_program}-lite @@ -1389,6 +1391,10 @@ reload_command() # $* = original arguments less the command. sbindir=/sbin fi + temp=$(rsh_command ${g_program}-lite show config 2> /dev/null | grep ^CONFDIR | sed 's/CONFDIR is //') + + [ -n "$temp" ] && confdir="$temp" + if [ -z "$getcaps" ]; then g_shorewalldir=$(resolve_file $directory) ensure_config_path @@ -1431,7 +1437,6 @@ reload_command() # $* = original arguments less the command. [ -f $save ] && progress_message3 "Copying $save to ${system}:/etc/${g_program}-lite/" && rcp_command $save /etc/shorewall-lite/ - progress_message3 "Copy complete" if [ $COMMAND = reload ]; then rsh_command "${sbindir}/${g_program}-lite $g_debugging $verbose $timestamp restart" && \ progress_message3 "System $system reloaded" || saveit=