A couple more OpenWRT fixes

- Detect OpenWRT in the configure script
- Fix the Shorewall6-lite uninstaller
This commit is contained in:
Tom Eastep 2015-11-07 07:20:44 -08:00
parent ec1c9bd991
commit 8ae6e3ff57
2 changed files with 7 additions and 4 deletions

View File

@ -143,6 +143,9 @@ if [ -z "$vendor" ]; then
elif [ -f /etc/arch-release ] ; then elif [ -f /etc/arch-release ] ; then
params[HOST]=archlinux params[HOST]=archlinux
rcfile=shorewallrc.archlinux rcfile=shorewallrc.archlinux
elif [ -f /etc/openwrt_release ]; then
params[HOST]=openwrt
rcfile=shorewallrc.openwrt
else else
params[HOST]=linux params[HOST]=linux
rcfile=shorewallrc.default rcfile=shorewallrc.default

View File

@ -144,16 +144,16 @@ fi
if [ -f ${SHAREDIR}/shorewall6-lite/version ]; then if [ -f ${SHAREDIR}/shorewall6-lite/version ]; then
INSTALLED_VERSION="$(cat ${SHAREDIR}/shorewall6-lite/version)" INSTALLED_VERSION="$(cat ${SHAREDIR}/shorewall6-lite/version)"
if [ "$INSTALLED_VERSION" != "$VERSION" ]; then if [ "$INSTALLED_VERSION" != "$VERSION" ]; then
echo "WARNING: Shorewall Lite Version $INSTALLED_VERSION is installed" echo "WARNING: Shorewall6 Lite Version $INSTALLED_VERSION is installed"
echo " and this is the $VERSION uninstaller." echo " and this is the $VERSION uninstaller."
VERSION="$INSTALLED_VERSION" VERSION="$INSTALLED_VERSION"
fi fi
else else
echo "WARNING: Shorewall Lite Version $VERSION is not installed" echo "WARNING: Shorewall6 Lite Version $VERSION is not installed"
VERSION="" VERSION=""
fi fi
echo "Uninstalling Shorewall Lite $VERSION" echo "Uninstalling Shorewall6 Lite $VERSION"
[ -n "$SANDBOX" ] && configure=0 [ -n "$SANDBOX" ] && configure=0
@ -169,7 +169,7 @@ if [ -f ${SHAREDIR}/shorewall6-lite/init ]; then
/etc/init.d/shorewall6-lite disable /etc/init.d/shorewall6-lite disable
fi fi
FIREWALL$(readlink ${SHAREDIR}/shorewall6-lite/init) FIREWALL=$(readlink ${SHAREDIR}/shorewall6-lite/init)
else else
FIREWALL=$(readlink -m -q ${SHAREDIR}/shorewall6-lite/init) FIREWALL=$(readlink -m -q ${SHAREDIR}/shorewall6-lite/init)
fi fi