forked from extern/shorewall_code
Implement SANDBOX variable in the installers/uninstallers
Signed-off-by: Tom Eastep <teastep@shorewall.net>
This commit is contained in:
parent
f9a21bd90e
commit
00b0489047
@ -184,6 +184,8 @@ for var in SHAREDIR LIBEXECDIR CONFDIR SBINDIR VARLIB VARDIR; do
|
|||||||
require $var
|
require $var
|
||||||
done
|
done
|
||||||
|
|
||||||
|
[ -n "$SANDBOX" ] && configure=0
|
||||||
|
|
||||||
PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/bin:/usr/local/sbin
|
PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/bin:/usr/local/sbin
|
||||||
|
|
||||||
if [ -z "$BUILD" ]; then
|
if [ -z "$BUILD" ]; then
|
||||||
|
@ -151,22 +151,29 @@ fi
|
|||||||
|
|
||||||
echo "Uninstalling Shorewall Init $VERSION"
|
echo "Uninstalling Shorewall Init $VERSION"
|
||||||
|
|
||||||
|
[ -n "$SANDBOX" ] && configure=0
|
||||||
|
|
||||||
INITSCRIPT=${CONFDIR}/init.d/shorewall-init
|
INITSCRIPT=${CONFDIR}/init.d/shorewall-init
|
||||||
|
|
||||||
if [ -f "$INITSCRIPT" ]; then
|
if [ -f "$INITSCRIPT" ]; then
|
||||||
|
if [ $configure -eq 1 ]; then
|
||||||
if mywhich updaterc.d ; then
|
if mywhich updaterc.d ; then
|
||||||
updaterc.d shorewall-init remove
|
updaterc.d shorewall-init remove
|
||||||
elif mywhich insserv ; then
|
elif mywhich insserv ; then
|
||||||
insserv -r $INITSCRIPT
|
insserv -r $INITSCRIPT
|
||||||
elif mywhich chkconfig ; then
|
elif mywhich chkconfig ; then
|
||||||
chkconfig --del $(basename $INITSCRIPT)
|
chkconfig --del $(basename $INITSCRIPT)
|
||||||
elif mywhich systemctl ; then
|
fi
|
||||||
systemctl disable shorewall-init
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
remove_file $INITSCRIPT
|
remove_file $INITSCRIPT
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if [ -n "$SYSTEMD" ]; then
|
||||||
|
[ $configure -eq 1 ] && systemctl disable shorewall-init.service
|
||||||
|
rm -f $SYSTEMD/shorewall-init.service
|
||||||
|
fi
|
||||||
|
|
||||||
[ "$(readlink -m -q ${SBINDIR}/ifup-local)" = ${SHAREDIR}/shorewall-init ] && remove_file ${SBINDIR}/ifup-local
|
[ "$(readlink -m -q ${SBINDIR}/ifup-local)" = ${SHAREDIR}/shorewall-init ] && remove_file ${SBINDIR}/ifup-local
|
||||||
[ "$(readlink -m -q ${SBINDIR}/ifdown-local)" = ${SHAREDIR}/shorewall-init ] && remove_file ${SBINDIR}/ifdown-local
|
[ "$(readlink -m -q ${SBINDIR}/ifdown-local)" = ${SHAREDIR}/shorewall-init ] && remove_file ${SBINDIR}/ifdown-local
|
||||||
|
|
||||||
|
@ -195,6 +195,8 @@ done
|
|||||||
|
|
||||||
PATH=${SBINDIR}:/bin:/usr${SBINDIR}:/usr/bin:/usr/local/bin:/usr/local${SBINDIR}
|
PATH=${SBINDIR}:/bin:/usr${SBINDIR}:/usr/bin:/usr/local/bin:/usr/local${SBINDIR}
|
||||||
|
|
||||||
|
[ -n "$SANDBOX" ] && configure=0
|
||||||
|
|
||||||
#
|
#
|
||||||
# Determine where to install the firewall script
|
# Determine where to install the firewall script
|
||||||
#
|
#
|
||||||
|
@ -153,6 +153,8 @@ fi
|
|||||||
|
|
||||||
echo "Uninstalling Shorewall Lite $VERSION"
|
echo "Uninstalling Shorewall Lite $VERSION"
|
||||||
|
|
||||||
|
[ -n "$SANDBOX" ] && configure=0
|
||||||
|
|
||||||
if qt iptables -L shorewall -n && [ ! -f ${SBINDIR}/shorewall ]; then
|
if qt iptables -L shorewall -n && [ ! -f ${SBINDIR}/shorewall ]; then
|
||||||
shorewall-lite clear
|
shorewall-lite clear
|
||||||
fi
|
fi
|
||||||
@ -171,14 +173,17 @@ if [ -f "$FIREWALL" ]; then
|
|||||||
insserv -r $FIREWALL
|
insserv -r $FIREWALL
|
||||||
elif mywhich chkconfig ; then
|
elif mywhich chkconfig ; then
|
||||||
chkconfig --del $(basename $FIREWALL)
|
chkconfig --del $(basename $FIREWALL)
|
||||||
elif mywhich systemctl ; then
|
|
||||||
systemctl disable shorewall-lite
|
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
remove_file $FIREWALL
|
remove_file $FIREWALL
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if [ -n "$SYSTEMD" ]; then
|
||||||
|
[ $configure -eq 1 ] && systemctl disable ${PRODUCT}
|
||||||
|
rm -f $SYSTEMD/${PRODUCT}.service
|
||||||
|
fi
|
||||||
|
|
||||||
rm -f ${SBINDIR}/shorewall-lite
|
rm -f ${SBINDIR}/shorewall-lite
|
||||||
|
|
||||||
rm -rf ${SBINDIR}/shorewall-lite
|
rm -rf ${SBINDIR}/shorewall-lite
|
||||||
|
@ -209,6 +209,8 @@ done
|
|||||||
|
|
||||||
[ -n "${INITFILE}" ] && require INITSOURCE && require INITDIR
|
[ -n "${INITFILE}" ] && require INITSOURCE && require INITDIR
|
||||||
|
|
||||||
|
[ -n "$SANDBOX" ] && configure=0
|
||||||
|
|
||||||
if [ -z "$BUILD" ]; then
|
if [ -z "$BUILD" ]; then
|
||||||
case $(uname) in
|
case $(uname) in
|
||||||
cygwin*|CYGWIN*)
|
cygwin*|CYGWIN*)
|
||||||
|
@ -152,6 +152,8 @@ fi
|
|||||||
|
|
||||||
echo "Uninstalling shorewall $VERSION"
|
echo "Uninstalling shorewall $VERSION"
|
||||||
|
|
||||||
|
[ -n "$SANDBOX" ] && configure=0
|
||||||
|
|
||||||
if qt iptables -L shorewall -n && [ ! -f ${SBINDIR}/shorewall-lite ]; then
|
if qt iptables -L shorewall -n && [ ! -f ${SBINDIR}/shorewall-lite ]; then
|
||||||
shorewall clear
|
shorewall clear
|
||||||
fi
|
fi
|
||||||
@ -166,14 +168,17 @@ if [ -f "$INITSCRIPT" ]; then
|
|||||||
insserv -r $INITSCRIPT
|
insserv -r $INITSCRIPT
|
||||||
elif mywhich chkconfig ; then
|
elif mywhich chkconfig ; then
|
||||||
chkconfig --del $(basename $INITSCRIPT)
|
chkconfig --del $(basename $INITSCRIPT)
|
||||||
elif mywhich systemctl ; then
|
|
||||||
systemctl disable ${PRODUCT}
|
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
remove_file $INITSCRIPT
|
remove_file $INITSCRIPT
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if [ -n "$SYSTEMD" ]; then
|
||||||
|
[ $configure -eq 1 ] && systemctl disable ${PRODUCT}
|
||||||
|
rm -f $SYSTEMD/${PRODUCT}.service
|
||||||
|
fi
|
||||||
|
|
||||||
rm -rf ${SHAREDIR}/shorewall/version
|
rm -rf ${SHAREDIR}/shorewall/version
|
||||||
rm -rf ${CONFDIR}/shorewall
|
rm -rf ${CONFDIR}/shorewall
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user