From 613305e9232d9b5d88158deeeab01ce9b5990b6c Mon Sep 17 00:00:00 2001 From: Jake Guffey Date: Wed, 19 Sep 2012 17:00:22 -0400 Subject: [PATCH] Fix typo Generated code had unterminated string in first check, causing future check to fail --- conf/type/__pf_apply/gencode-remote | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/conf/type/__pf_apply/gencode-remote b/conf/type/__pf_apply/gencode-remote index 72200b59..aa3864b0 100755 --- a/conf/type/__pf_apply/gencode-remote +++ b/conf/type/__pf_apply/gencode-remote @@ -33,7 +33,7 @@ if [ -f "${rcvar}.old" ]; then # rcvar.old exists, we must need to disable pf # If it already is disabled, pfctl -d returns 1, go on with life pfctl -d # Cleanup - rm -f "${rcvar}.old + rm -f "${rcvar}.old" # This file shouldn't exist, but just in case... [ -f "${rcvar}" ] && rm -f "${rcvar}" elif [ -f "${rcvar}.new" ]; then # rcvar.new exists, we must need to apply it @@ -43,12 +43,15 @@ elif [ -f "${rcvar}.new" ]; then # rcvar.new exists, we must need to apply it pfctl -f "${rcvar}" ret="$?" # Cleanup - rm -f "${rcvar}.old + rm -f "${rcvar}.old" # This file shouldn't exist, but just in case... [ -f "${rcvar}" ] && rm -f "${rcvar}" if [ "$ret" -ne "0" ]; then # failed to configure new ruleset - echo "Failed to configure the new ruleset on ${__target_host}\!" >&2 + echo "Failed to configure the new ruleset on ${__target_host}!" >&2 fi +else # neither ${rcvar}.old nor ${rcvar}.new exist? error. + echo "Neither ${rcvar}.old nor ${rcvar}.new exist! Something is wrong." >&2 + exit 1 fi EOF