mirror of
https://gitlab.com/shorewall/code.git
synced 2024-12-22 06:10:42 +01:00
More uninstall corrections.
Signed-off-by: Tom Eastep <teastep@shorewall.net>
This commit is contained in:
parent
2fce05b3ab
commit
9dc2bba025
@ -27,6 +27,7 @@
|
|||||||
# shown below. Simply run this script to remove Shorewall Firewall
|
# shown below. Simply run this script to remove Shorewall Firewall
|
||||||
|
|
||||||
VERSION=xxx #The Build script inserts the actual version
|
VERSION=xxx #The Build script inserts the actual version
|
||||||
|
PRODUCT=shorewall-lite
|
||||||
|
|
||||||
usage() # $1 = exit status
|
usage() # $1 = exit status
|
||||||
{
|
{
|
||||||
@ -182,17 +183,15 @@ fi
|
|||||||
|
|
||||||
if [ -n "$SYSTEMD" ]; then
|
if [ -n "$SYSTEMD" ]; then
|
||||||
[ $configure -eq 1 ] && systemctl disable ${PRODUCT}
|
[ $configure -eq 1 ] && systemctl disable ${PRODUCT}
|
||||||
rm -f $SYSTEMD/${PRODUCT}.service
|
rm -f $SYSTEMD/shorewall-lite.service
|
||||||
fi
|
fi
|
||||||
|
|
||||||
rm -f ${SBINDIR}/shorewall-lite
|
rm -f ${SBINDIR}/shorewall-lite
|
||||||
|
|
||||||
rm -rf ${SBINDIR}/shorewall-lite
|
|
||||||
rm -rf ${VARDIR}/shorewall-lite
|
rm -rf ${VARDIR}/shorewall-lite
|
||||||
rm -rf ${SHAREDIR}/shorewall-lite
|
rm -rf ${SHAREDIR}/shorewall-lite
|
||||||
rm -rf ${LIBEXEC}/shorewall-lite
|
rm -rf ${LIBEXEC}/shorewall-lite
|
||||||
rm -f ${CONFDIR}/logrotate.d/shorewall-lite
|
rm -f ${CONFDIR}/logrotate.d/shorewall-lite
|
||||||
[ -n "$SYSTEMD" ] && rm -f ${SYSTEMD}/shorewall-lite.service
|
|
||||||
|
|
||||||
echo "Shorewall Lite Uninstalled"
|
echo "Shorewall Lite Uninstalled"
|
||||||
|
|
||||||
|
@ -27,6 +27,7 @@
|
|||||||
# shown below. Simply run this script to remove Shorewall Firewall
|
# shown below. Simply run this script to remove Shorewall Firewall
|
||||||
|
|
||||||
VERSION=xxx #The Build script inserts the actual version
|
VERSION=xxx #The Build script inserts the actual version
|
||||||
|
PRODUCT=shorewall
|
||||||
|
|
||||||
usage() # $1 = exit status
|
usage() # $1 = exit status
|
||||||
{
|
{
|
||||||
@ -177,7 +178,7 @@ fi
|
|||||||
|
|
||||||
if [ -n "$SYSTEMD" ]; then
|
if [ -n "$SYSTEMD" ]; then
|
||||||
[ $configure -eq 1 ] && systemctl disable ${PRODUCT}
|
[ $configure -eq 1 ] && systemctl disable ${PRODUCT}
|
||||||
rm -f $SYSTEMD/${PRODUCT}.service
|
rm -f $SYSTEMD/shorewall.service
|
||||||
fi
|
fi
|
||||||
|
|
||||||
rm -rf ${SHAREDIR}/shorewall/version
|
rm -rf ${SHAREDIR}/shorewall/version
|
||||||
@ -189,7 +190,7 @@ if [ -n "$SYSCONFDIR" ]; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
rm -rf ${VARDIR}/shorewall
|
rm -rf ${VARDIR}/shorewall
|
||||||
rm -rf ${PERLLIB}/Shorewall/*
|
rm -rf ${PERLLIBDIR}/Shorewall/*
|
||||||
rm -rf ${LIBEXEC}/shorewall
|
rm -rf ${LIBEXEC}/shorewall
|
||||||
rm -rf ${SHAREDIR}/shorewall/configfiles/
|
rm -rf ${SHAREDIR}/shorewall/configfiles/
|
||||||
rm -rf ${SHAREDIR}/shorewall/Samples/
|
rm -rf ${SHAREDIR}/shorewall/Samples/
|
||||||
|
@ -27,6 +27,7 @@
|
|||||||
# shown below. Simply run this script to remove Shorewall Firewall
|
# shown below. Simply run this script to remove Shorewall Firewall
|
||||||
|
|
||||||
VERSION=xxx #The Build script inserts the actual version
|
VERSION=xxx #The Build script inserts the actual version
|
||||||
|
PRODUCT=shorewall6-lite
|
||||||
|
|
||||||
usage() # $1 = exit status
|
usage() # $1 = exit status
|
||||||
{
|
{
|
||||||
@ -69,6 +70,42 @@ remove_file() # $1 = file to restore
|
|||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
finished=0
|
||||||
|
configure=1
|
||||||
|
|
||||||
|
while [ $finished -eq 0 ]; do
|
||||||
|
option=$1
|
||||||
|
|
||||||
|
case "$option" in
|
||||||
|
-*)
|
||||||
|
option=${option#-}
|
||||||
|
|
||||||
|
while [ -n "$option" ]; do
|
||||||
|
case $option in
|
||||||
|
h)
|
||||||
|
usage 0
|
||||||
|
;;
|
||||||
|
v)
|
||||||
|
echo "$Product Firewall Installer Version $VERSION"
|
||||||
|
exit 0
|
||||||
|
;;
|
||||||
|
n*)
|
||||||
|
configure=0
|
||||||
|
option=${option#n}
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
usage 1
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
done
|
||||||
|
|
||||||
|
shift
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
finished=1
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
done
|
||||||
#
|
#
|
||||||
# Read the RC file
|
# Read the RC file
|
||||||
#
|
#
|
||||||
@ -112,8 +149,12 @@ fi
|
|||||||
|
|
||||||
echo "Uninstalling Shorewall Lite $VERSION"
|
echo "Uninstalling Shorewall Lite $VERSION"
|
||||||
|
|
||||||
if qt ip6tables -L shorewall -n && [ ! -f ${SBINDIR)/shorewall6 ]; then
|
[ -n "$SANDBOX" ] && configure=0
|
||||||
${SBINDIR}/shorewall6-lite clear
|
|
||||||
|
if [ $configure -eq 1 ]; then
|
||||||
|
if qt ip6tables -L shorewall -n && [ ! -f ${SBINDIR)/shorewall6 ]; then
|
||||||
|
${SBINDIR}/shorewall6-lite clear
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ -l ${SHAREDIR}/shorewall6-lite/init ]; then
|
if [ -l ${SHAREDIR}/shorewall6-lite/init ]; then
|
||||||
@ -123,19 +164,26 @@ elif [ -n "$INITFILE" ]; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
if [ -f "$FIREWALL" ]; then
|
if [ -f "$FIREWALL" ]; then
|
||||||
if mywhich updaterc.d ; then
|
if [ $configure -eq 1 ]; then
|
||||||
updaterc.d shorewall6-lite remove
|
if mywhich updaterc.d ; then
|
||||||
elif mywhich insserv ; then
|
updaterc.d shorewall6-lite remove
|
||||||
insserv -r $FIREWALL
|
elif mywhich insserv ; then
|
||||||
elif mywhich chkconfig ; then
|
insserv -r $FIREWALL
|
||||||
chkconfig --del $(basename $FIREWALL)
|
elif mywhich chkconfig ; then
|
||||||
elif mywhich systemctl ; then
|
chkconfig --del $(basename $FIREWALL)
|
||||||
systemctl disable shorewall6-lite
|
elif mywhich systemctl ; then
|
||||||
|
systemctl disable shorewall6-lite
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
remove_file $FIREWALL
|
remove_file $FIREWALL
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if [ -n "$SYSTEMD" ]; then
|
||||||
|
[ $configure -eq 1 ] && systemctl disable ${PRODUCT}
|
||||||
|
rm -f $SYSTEMD/shorewall6-lite.service
|
||||||
|
fi
|
||||||
|
|
||||||
rm -f ${SBINDIR}/shorewall6-lite
|
rm -f ${SBINDIR}/shorewall6-lite
|
||||||
rm -rf ${CONFDIR}/shorewall6-lite
|
rm -rf ${CONFDIR}/shorewall6-lite
|
||||||
rm -rf ${VARDIR}/shorewall6-lite
|
rm -rf ${VARDIR}/shorewall6-lite
|
||||||
|
@ -27,6 +27,7 @@
|
|||||||
# shown below. Simply run this script to remove Shorewall Firewall
|
# shown below. Simply run this script to remove Shorewall Firewall
|
||||||
|
|
||||||
VERSION=xxx #The Build script inserts the actual version
|
VERSION=xxx #The Build script inserts the actual version
|
||||||
|
PRODUCT=shorewall6
|
||||||
|
|
||||||
usage() # $1 = exit status
|
usage() # $1 = exit status
|
||||||
{
|
{
|
||||||
@ -69,6 +70,43 @@ remove_file() # $1 = file to restore
|
|||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
finished=0
|
||||||
|
configure=1
|
||||||
|
|
||||||
|
while [ $finished -eq 0 ]; do
|
||||||
|
option=$1
|
||||||
|
|
||||||
|
case "$option" in
|
||||||
|
-*)
|
||||||
|
option=${option#-}
|
||||||
|
|
||||||
|
while [ -n "$option" ]; do
|
||||||
|
case $option in
|
||||||
|
h)
|
||||||
|
usage 0
|
||||||
|
;;
|
||||||
|
v)
|
||||||
|
echo "$Product Firewall Installer Version $VERSION"
|
||||||
|
exit 0
|
||||||
|
;;
|
||||||
|
n*)
|
||||||
|
configure=0
|
||||||
|
option=${option#n}
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
usage 1
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
done
|
||||||
|
|
||||||
|
shift
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
finished=1
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
done
|
||||||
|
|
||||||
#
|
#
|
||||||
# Read the RC file
|
# Read the RC file
|
||||||
#
|
#
|
||||||
@ -112,8 +150,12 @@ fi
|
|||||||
|
|
||||||
echo "Uninstalling shorewall6 $VERSION"
|
echo "Uninstalling shorewall6 $VERSION"
|
||||||
|
|
||||||
if qt ip6tables -L shorewall6 -n && [ ! -f ${SBINDIR}/shorewall6-lite ]; then
|
[ -n "$SANDBOX" ] && configure=0
|
||||||
${SBINDIR}/shorewall6 clear
|
|
||||||
|
if [ $configure -eq 1 ]; then
|
||||||
|
if qt ip6tables -L shorewall6 -n && [ ! -f ${SBINDIR}/shorewall6-lite ]; then
|
||||||
|
${SBINDIR}/shorewall6 clear
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ -L ${SHAREDIR}/shorewall6/init ]; then
|
if [ -L ${SHAREDIR}/shorewall6/init ]; then
|
||||||
@ -123,19 +165,24 @@ elif [ -n "$INITFILE" ]; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
if [ -f "$FIREWALL" ]; then
|
if [ -f "$FIREWALL" ]; then
|
||||||
if mywhich updaterc.d ; then
|
if [ $configure -eq 1 ]; then
|
||||||
updaterc.d shorewall6 remove
|
if mywhich updaterc.d ; then
|
||||||
elif mywhich insserv ; then
|
updaterc.d shorewall6 remove
|
||||||
insserv -r $FIREWALL
|
elif mywhich insserv ; then
|
||||||
elif mywhich chkconfig ; then
|
insserv -r $FIREWALL
|
||||||
chkconfig --del $(basename $FIREWALL)
|
elif mywhich chkconfig ; then
|
||||||
elif mywhich systemctl ; then
|
chkconfig --del $(basename $FIREWALL)
|
||||||
systemctl disable shorewall6
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
remove_file $FIREWALL
|
remove_file $FIREWALL
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if [ -n "$SYSTEMD" ]; then
|
||||||
|
[ $configure -eq 1 ] && systemctl disable ${PRODUCT}
|
||||||
|
rm -f $SYSTEMD/shorewall6.service
|
||||||
|
fi
|
||||||
|
|
||||||
rm -f ${SBINDIR}/shorewall6
|
rm -f ${SBINDIR}/shorewall6
|
||||||
rm -rf ${CONFDIR}/shorewall6
|
rm -rf ${CONFDIR}/shorewall6
|
||||||
rm -rf ${VARDIR}/shorewall6
|
rm -rf ${VARDIR}/shorewall6
|
||||||
|
Loading…
Reference in New Issue
Block a user