diff --git a/Shorewall-core/install.sh b/Shorewall-core/install.sh index 0c89de940..24e22b340 100755 --- a/Shorewall-core/install.sh +++ b/Shorewall-core/install.sh @@ -315,7 +315,6 @@ 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" # diff --git a/Shorewall-core/lib.core b/Shorewall-core/lib.core index b54b9608c..b6a9efe7e 100644 --- a/Shorewall-core/lib.core +++ b/Shorewall-core/lib.core @@ -71,21 +71,7 @@ setup_product_environment() { # $1 = if non-empty, source shorewallrc again now ;; esac - 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 + [ -f ${SHAREDIR}/${PRODUCT}/version ] || fatal_error "$g_product does not appear to be installed on this system" # # We need to do this again, now that we have the correct product # diff --git a/Shorewall-core/uninstall.sh b/Shorewall-core/uninstall.sh index 87b3cd975..645114675 100755 --- a/Shorewall-core/uninstall.sh +++ b/Shorewall-core/uninstall.sh @@ -134,8 +134,6 @@ fi remove_directory ${SHAREDIR}/shorewall remove_file ~/.shorewallrc -remove_file ${SBINDIR}/shorewall -remove_file ${SBINDIR}/shorewall6 # # Report Success diff --git a/Shorewall/install.sh b/Shorewall/install.sh index 9903820ee..8abe1bf23 100755 --- a/Shorewall/install.sh +++ b/Shorewall/install.sh @@ -1087,6 +1087,10 @@ 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 diff --git a/Shorewall/uninstall.sh b/Shorewall/uninstall.sh index d7d45856d..e14a2d517 100755 --- a/Shorewall/uninstall.sh +++ b/Shorewall/uninstall.sh @@ -149,6 +149,10 @@ 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