Signed-off-by: Matt Darfeuille <[email protected]>
---
Shorewall-core/install.sh | 3 +--
Shorewall-init/install.sh | 6 ++----
Shorewall-lite/install.sh | 3 +--
Shorewall/install.sh | 12 ++++--------
4 files changed, 8 insertions(+), 16 deletions(-)
diff --git a/Shorewall-core/install.sh b/Shorewall-core/install.sh
index 0fe9bf3..9750979 100755
--- a/Shorewall-core/install.sh
+++ b/Shorewall-core/install.sh
@@ -241,8 +241,7 @@ case "$HOST" in
debian|gentoo|redhat|slackware|archlinux|linux|suse|openwrt)
;;
*)
- echo "ERROR: Unknown HOST \"$HOST\"" >&2
- exit 1;
+ fatal_error "Unknown HOST \"$HOST\""
;;
esac
diff --git a/Shorewall-init/install.sh b/Shorewall-init/install.sh
index 57a495b..d89dbc3 100755
--- a/Shorewall-init/install.sh
+++ b/Shorewall-init/install.sh
@@ -254,12 +254,10 @@ case "$HOST" in
echo "Installing Openwrt-specific configuration..."
;;
linux)
- echo "ERROR: Shorewall-init is not supported on this system" >&2
- exit 1
+ fatal_error "Shorewall-init is not supported on this system"
;;
*)
- echo "ERROR: Unsupported HOST distribution: \"$HOST\"" >&2
- exit 1;
+ fatal_error "Unsupported HOST distribution: \"$HOST\""
;;
esac
diff --git a/Shorewall-lite/install.sh b/Shorewall-lite/install.sh
index df3edf3..a485c53 100755
--- a/Shorewall-lite/install.sh
+++ b/Shorewall-lite/install.sh
@@ -269,8 +269,7 @@ case "$HOST" in
linux)
;;
*)
- echo "ERROR: Unknown HOST \"$HOST\"" >&2
- exit 1;
+ fatal_error "ERROR: Unknown HOST \"$HOST\""
;;
esac
diff --git a/Shorewall/install.sh b/Shorewall/install.sh
index f06764c..139d325 100755
--- a/Shorewall/install.sh
+++ b/Shorewall/install.sh
@@ -266,8 +266,7 @@ case "$HOST" in
linux)
;;
*)
- echo "ERROR: Unknown HOST \"$HOST\"" >&2
- exit 1;
+ fatal_error "Unknown HOST \"$HOST\""
;;
esac
@@ -278,8 +277,7 @@ if [ $PRODUCT = shorewall ]; then
#
if [ "$DIGEST" != SHA ]; then
if [ "$BUILD" = "$HOST" ] && ! eval perl -e \'use
Digest::$DIGEST\;\' 2> /dev/null ; then
- echo "ERROR: Perl compilation with Digest::$DIGEST failed" >&2
- exit 1;
+ fatal_error "Perl compilation with Digest::$DIGEST failed"
fi
cp -af Perl/Shorewall/Chains.pm Perl/Shorewall/Chains.pm.bak
@@ -302,8 +300,7 @@ if [ $PRODUCT = shorewall ]; then
sed -i 's/Digest::SHA/Digest::SHA1/' Perl/Shorewall/Config.pm
DIGEST=SHA1
else
- echo "ERROR: Shorewall $VERSION requires either Digest::SHA or
Digest::SHA1" >&2
- exit 1
+ fatal_error "Shorewall $VERSION requires either Digest::SHA or
Digest::SHA1"
fi
fi
fi
@@ -334,8 +331,7 @@ fi
run_install -d $OWNERSHIP -m 0755 ${DESTDIR}${SBINDIR}
[ -n "${INITFILE}" ] && run_install -d $OWNERSHIP -m 0755 ${DESTDIR}${INITDIR}
if [ -z "$DESTDIR" -a $PRODUCT != shorewall ]; then
- [ -x ${LIBEXECDIR}/shorewall/compiler.pl ] || \
- { echo " ERROR: Shorewall >= 4.5.0 is not installed" >&2; exit 1; }
+ [ -x ${LIBEXECDIR}/shorewall/compiler.pl ] || fatal_error "Shorewall >=
4.5.0 is not installed"
fi
echo "Installing $Product Version $VERSION"
--
2.8.3
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
Shorewall-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/shorewall-devel