mirror of
https://gitlab.com/shorewall/code.git
synced 2024-11-07 16:24:01 +01:00
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:
parent
ca78c0221c
commit
1ca886abd7
@ -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"
|
||||
#
|
||||
|
@ -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
|
||||
#
|
||||
|
@ -134,6 +134,8 @@ fi
|
||||
|
||||
remove_directory ${SHAREDIR}/shorewall
|
||||
remove_file ~/.shorewallrc
|
||||
remove_file ${SBINDIR}/shorewall
|
||||
remove_file ${SBINDIR}/shorewall6
|
||||
|
||||
#
|
||||
# Report Success
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user