mirror of
https://gitlab.com/shorewall/code.git
synced 2025-02-16 17:51:16 +01:00
Update uninstall scripts for multiple .shorewallrc locations.
Signed-off-by: Tom Eastep <teastep@shorewall.net>
This commit is contained in:
parent
e641bf7ac2
commit
b31f656d63
@ -60,12 +60,22 @@ remove_file() # $1 = file to restore
|
|||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
if [ -f ~/.shorewallrc ]; then
|
if [ -f ./.shorewallrc ]; then
|
||||||
. ~/shorewallrc || exit 1
|
. ./.shorewallrc || exit 1
|
||||||
|
elif [ -f ~/.shorewallrc ]; then
|
||||||
|
. ~/.shorewallrc || exit 1
|
||||||
|
elif [ -r /root/.shorewallrc ]; then
|
||||||
|
. /root/.shorewallrc || exit 1
|
||||||
|
elif [ -r /.shorewallrc ]; then
|
||||||
|
. /root/.shorewallrc || exit 1
|
||||||
|
elif - -f ${SHOREAWLLRC_HOME}/.shorewallrc; then
|
||||||
|
. ${SHOREWALLRC_HOME}/.shorewallrc || exit 1
|
||||||
|
else
|
||||||
|
SHAREDIR=/usr/share
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ -f /usr/share/shorewall/coreversion ]; then
|
if [ -f ${SHAREDIR}/shorewall/coreversion ]; then
|
||||||
INSTALLED_VERSION="$(cat /usr/share/shorewall/coreversion)"
|
INSTALLED_VERSION="$(cat ${SHAREDIR}/shorewall/coreversion)"
|
||||||
if [ "$INSTALLED_VERSION" != "$VERSION" ]; then
|
if [ "$INSTALLED_VERSION" != "$VERSION" ]; then
|
||||||
echo "WARNING: Shorewall Core Version $INSTALLED_VERSION is installed"
|
echo "WARNING: Shorewall Core Version $INSTALLED_VERSION is installed"
|
||||||
echo " and this is the $VERSION uninstaller."
|
echo " and this is the $VERSION uninstaller."
|
||||||
|
@ -69,8 +69,16 @@ remove_file() # $1 = file to restore
|
|||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
if [ -f ~/.shorewallrc ]; then
|
if [ -f ./.shorewallrc ]; then
|
||||||
. ~/shorewallrc || exit 1
|
. ./.shorewallrc || exit 1
|
||||||
|
elif [ -f ~/.shorewallrc ]; then
|
||||||
|
. ~/.shorewallrc || exit 1
|
||||||
|
elif [ -r /root/.shorewallrc ]; then
|
||||||
|
. /root/.shorewallrc || exit 1
|
||||||
|
elif [ -r /.shorewallrc ]; then
|
||||||
|
. /root/.shorewallrc || exit 1
|
||||||
|
elif - -f ${SHOREAWLLRC_HOME}/.shorewallrc; then
|
||||||
|
. ${SHOREWALLRC_HOME}/.shorewallrc || exit 1
|
||||||
else
|
else
|
||||||
[ -n "${LIBEXEC:=/usr/share}" ]
|
[ -n "${LIBEXEC:=/usr/share}" ]
|
||||||
[ -n "${PERLLIB:=/usr/share/shorewall}" ]
|
[ -n "${PERLLIB:=/usr/share/shorewall}" ]
|
||||||
|
@ -69,8 +69,16 @@ remove_file() # $1 = file to restore
|
|||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
if [ -f ~/.shorewallrc ]; then
|
if [ -f ./.shorewallrc ]; then
|
||||||
. ~/shorewallrc || exit 1
|
. ./.shorewallrc || exit 1
|
||||||
|
elif [ -f ~/.shorewallrc ]; then
|
||||||
|
. ~/.shorewallrc || exit 1
|
||||||
|
elif [ -r /root/.shorewallrc ]; then
|
||||||
|
. /root/.shorewallrc || exit 1
|
||||||
|
elif [ -r /.shorewallrc ]; then
|
||||||
|
. /root/.shorewallrc || exit 1
|
||||||
|
elif - -f ${SHOREAWLLRC_HOME}/.shorewallrc; then
|
||||||
|
. ${SHOREWALLRC_HOME}/.shorewallrc || exit 1
|
||||||
else
|
else
|
||||||
[ -n "${LIBEXEC:=/usr/share}" ]
|
[ -n "${LIBEXEC:=/usr/share}" ]
|
||||||
[ -n "${PERLLIB:=/usr/share/shorewall}" ]
|
[ -n "${PERLLIB:=/usr/share/shorewall}" ]
|
||||||
|
@ -69,8 +69,16 @@ remove_file() # $1 = file to restore
|
|||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
if [ -f ~/.shorewallrc ]; then
|
if [ -f ./.shorewallrc ]; then
|
||||||
. ~/shorewallrc || exit 1
|
. ./.shorewallrc || exit 1
|
||||||
|
elif [ -f ~/.shorewallrc ]; then
|
||||||
|
. ~/.shorewallrc || exit 1
|
||||||
|
elif [ -r /root/.shorewallrc ]; then
|
||||||
|
. /root/.shorewallrc || exit 1
|
||||||
|
elif [ -r /.shorewallrc ]; then
|
||||||
|
. /root/.shorewallrc || exit 1
|
||||||
|
elif - -f ${SHOREAWLLRC_HOME}/.shorewallrc; then
|
||||||
|
. ${SHOREWALLRC_HOME}/.shorewallrc || exit 1
|
||||||
else
|
else
|
||||||
[ -n "${LIBEXEC:=/usr/share}" ]
|
[ -n "${LIBEXEC:=/usr/share}" ]
|
||||||
[ -n "${PERLLIB:=/usr/share/shorewall}" ]
|
[ -n "${PERLLIB:=/usr/share/shorewall}" ]
|
||||||
|
@ -69,8 +69,16 @@ remove_file() # $1 = file to restore
|
|||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
if [ -f ~/.shorewallrc ]; then
|
if [ -f ./.shorewallrc ]; then
|
||||||
. ~/shorewallrc || exit 1
|
. ./.shorewallrc || exit 1
|
||||||
|
elif [ -f ~/.shorewallrc ]; then
|
||||||
|
. ~/.shorewallrc || exit 1
|
||||||
|
elif [ -r /root/.shorewallrc ]; then
|
||||||
|
. /root/.shorewallrc || exit 1
|
||||||
|
elif [ -r /.shorewallrc ]; then
|
||||||
|
. /root/.shorewallrc || exit 1
|
||||||
|
elif - -f ${SHOREAWLLRC_HOME}/.shorewallrc; then
|
||||||
|
. ${SHOREWALLRC_HOME}/.shorewallrc || exit 1
|
||||||
else
|
else
|
||||||
[ -n "${LIBEXEC:=/usr/share}" ]
|
[ -n "${LIBEXEC:=/usr/share}" ]
|
||||||
[ -n "${PERLLIB:=/usr/share/shorewall}" ]
|
[ -n "${PERLLIB:=/usr/share/shorewall}" ]
|
||||||
|
@ -69,8 +69,16 @@ remove_file() # $1 = file to restore
|
|||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
if [ -f ~/.shorewallrc ]; then
|
if [ -f ./.shorewallrc ]; then
|
||||||
. ~/shorewallrc || exit 1
|
. ./.shorewallrc || exit 1
|
||||||
|
elif [ -f ~/.shorewallrc ]; then
|
||||||
|
. ~/.shorewallrc || exit 1
|
||||||
|
elif [ -r /root/.shorewallrc ]; then
|
||||||
|
. /root/.shorewallrc || exit 1
|
||||||
|
elif [ -r /.shorewallrc ]; then
|
||||||
|
. /root/.shorewallrc || exit 1
|
||||||
|
elif - -f ${SHOREAWLLRC_HOME}/.shorewallrc; then
|
||||||
|
. ${SHOREWALLRC_HOME}/.shorewallrc || exit 1
|
||||||
else
|
else
|
||||||
[ -n "${LIBEXEC:=/usr/share}" ]
|
[ -n "${LIBEXEC:=/usr/share}" ]
|
||||||
[ -n "${PERLLIB:=/usr/share/shorewall}" ]
|
[ -n "${PERLLIB:=/usr/share/shorewall}" ]
|
||||||
|
Loading…
Reference in New Issue
Block a user