diff --git a/Shorewall-lite/install.sh b/Shorewall-lite/install.sh index a4b3a257f..e3a9ec2a5 100755 --- a/Shorewall-lite/install.sh +++ b/Shorewall-lite/install.sh @@ -403,6 +403,7 @@ echo "Common functions linked through ${DESTDIR}${SHAREDIR}/$PRODUCT/functions" # install_file shorecap ${DESTDIR}${LIBEXECDIR}/$PRODUCT/shorecap 0755 +[ $SHAREDIR = /usr/share ] || eval sed -i \'s\|/usr/share/\|${SHAREDIR}/\|\' ${DESTDIR}/${LIBEXECDIR}/$PRODUCT/shorecap echo echo "Capability file builder installed in ${DESTDIR}${LIBEXECDIR}/$PRODUCT/shorecap" diff --git a/Shorewall-lite/shorecap b/Shorewall-lite/shorecap index 578f9ad1b..e8e5659ec 100755 --- a/Shorewall-lite/shorecap +++ b/Shorewall-lite/shorecap @@ -45,17 +45,22 @@ # used during firewall compilation, then the generated firewall program will likewise not # require Shorewall to be installed. -SHAREDIR=/usr/share/shorewall-lite -VARDIR=/var/lib/shorewall-lite -CONFDIR=/etc/shorewall-lite -g_program=shorewall-lite -g_product="Shorewall Lite" -g_family=4 -g_base=shorewall -g_basedir=/usr/share/shorewall-lite -. /usr/share/shorewall-lite/lib.base -. /usr/share/shorewall/lib.cli +g_program=shorewall-lite + +# +# This is modified by the installer when ${SHAREDIR} != /usr/share +# +. /usr/share/shorewall/shorewallrc + +g_libexec="$LIBEXECDIR" +g_sharedir="$SHAREDIR"/shorewall-lite +g_sbindir="$SBINDIR" +g_vardir="$VARDIR" +g_confdir="$CONFDIR"/shorewall-lite +g_readrc=1 + +. ${SHAREDIR}/shorewall/lib.cli . /usr/share/shorewall-lite/configpath [ -n "$PATH" ] || PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/bin:/usr/local/sbin diff --git a/Shorewall6-lite/shorecap b/Shorewall6-lite/shorecap index af10870ff..27e51c589 100755 --- a/Shorewall6-lite/shorecap +++ b/Shorewall6-lite/shorecap @@ -45,17 +45,22 @@ # used during firewall compilation, then the generated firewall program will likewise not # require Shorewall to be installed. -SHAREDIR=/usr/share/shorewall6-lite -VARDIR=/var/lib/shorewall6-lite -CONFDIR=/etc/shorewall6-lite -g_product="Shorewall6 Lite" -g_family=6 -g_base=shorewall6 -g_basedir=/usr/share/shorewall6-lite +g_program=shorewall6-lite -. /usr/share/shorewall6-lite/lib.base -. /usr/share/shorewall6/lib.cli -. /usr/share/shorewall6-lite/configpath +# +# This is modified by the installer when ${SHAREDIR} != /usr/share +# +. /usr/share/shorewall/shorewallrc + +g_libexec="$LIBEXECDIR" +g_sharedir="$SHAREDIR"/shorewall6-lite +g_sbindir="$SBINDIR" +g_vardir="$VARDIR" +g_confdir="$CONFDIR"/shorewall6-lite +g_readrc=1 + +. ${SHAREDIR}/shorewall/lib.cli +. ${SHAREDIR}/shorewall-lite/configpath [ -n "$PATH" ] || PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/bin:/usr/local/sbin