From 50a9b4cc6a143d76cb638ed14a3ab93c144958cb Mon Sep 17 00:00:00 2001 From: Matt Darfeuille Date: Mon, 20 Feb 2017 18:52:02 +0100 Subject: [PATCH] core: Fail without a rc file and correct error msg Abort Shorewall-core's installer execution if no Rc file is detected. - Correct the error message Signed-off-by: Matt Darfeuille Signed-off-by: Tom Eastep --- Shorewall-core/install.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Shorewall-core/install.sh b/Shorewall-core/install.sh index 6bbd7b20c..0fe9bf31c 100755 --- a/Shorewall-core/install.sh +++ b/Shorewall-core/install.sh @@ -247,7 +247,7 @@ case "$HOST" in esac if [ -z "$file" ]; then - if $HOST = linux; then + if [ $HOST = linux ]; then file=shorewallrc.default else file=shorewallrc.${HOST} @@ -260,7 +260,8 @@ if [ -z "$file" ]; then echo "" >&2 echo "Example:" >&2 echo "" >&2 - echo " ./install.sh $file" &>2 + echo " ./install.sh $file" >&2 + exit 1 fi if [ -n "$DESTDIR" ]; then