Move ${SBINDIR}/shorewall6 to the Shorewall-core product

- Default 'shorewall6' to 'shorewall6-lite' if that product is installed
  and 'shorewall6' is not.

Signed-off-by: Tom Eastep <teastep@shorewall.net>
This commit is contained in:
Tom Eastep 2020-09-15 13:41:26 -07:00
parent ca78c0221c
commit 1ca886abd7
No known key found for this signature in database
GPG Key ID: 96E6B3F2423A4D10
5 changed files with 18 additions and 9 deletions

View File

@ -315,6 +315,7 @@ fi
# Install the CLI
#
install_file shorewall ${DESTDIR}${SBINDIR}/shorewall 0755
ln -sf shorewall ${DESTDIR}${SBINDIR}/shorewall6
[ $SHAREDIR = /usr/share ] || eval sed -i \'s\|/usr/share/\|${SHAREDIR}/\|\' ${DESTDIR}${SBINDIR}/shorewall
echo "Shorewall CLI program installed in ${DESTDIR}${SBINDIR}/shorewall"
#

View File

@ -71,7 +71,21 @@ setup_product_environment() { # $1 = if non-empty, source shorewallrc again now
;;
esac
[ -f ${SHAREDIR}/${PRODUCT}/version ] || fatal_error "$g_product does not appear to be installed on this system"
if [ ! -f ${SHAREDIR}/${PRODUCT}/version ]; then
if [ $PRODUCT = shorewall6 ]; then
if [ -f ${SHAREDIR}/shorewall6-lite/version ]; then
PRODUCT=shorewall6-lite
g_sharedir="${SHAREDIR}"/shorewall6-lite
g_confdir="${CONFDIR}"/shorewall6-lite
g_product="Shorewall6 Lite"
g_lite=Yes
else
fatal_error "Neither Shorewall6 nor Shorewall6 Lite are installed on this system"
fi
else
fatal_error "$g_product does not appear to be installed on this system"
fi
fi
#
# We need to do this again, now that we have the correct product
#

View File

@ -134,6 +134,8 @@ fi
remove_directory ${SHAREDIR}/shorewall
remove_file ~/.shorewallrc
remove_file ${SBINDIR}/shorewall
remove_file ${SBINDIR}/shorewall6
#
# Report Success

View File

@ -1087,10 +1087,6 @@ if [ ${PRODUCT} = shorewall6 ]; then
# Symbolically link 'functions' to lib.base
#
ln -sf lib.base ${DESTDIR}${SHAREDIR}/${PRODUCT}/functions
#
# And create a symbolic link for the CLI
#
ln -sf shorewall ${DESTDIR}${SBINDIR}/shorewall6
fi
if [ -d Perl ]; then

View File

@ -149,10 +149,6 @@ if [ $configure -eq 1 ]; then
fi
fi
if [ $PRODUCT = shorewall6 ]; then
remove_file ${SBINDIR}/shorewall6
fi
if [ -h ${SHAREDIR}/$PRODUCT/init ]; then
FIREWALL=$(readlink -m -q ${SHAREDIR}/$PRODUCT/init)
elif [ -n "$INITFILE" ]; then