From 9579cfe991d7c71251442dd9e2950839fe0a4be0 Mon Sep 17 00:00:00 2001 From: Gregory Colpart Date: Sun, 13 Sep 2015 17:14:32 +0200 Subject: [PATCH] Fix #1565. Use now /etc/default/minifirewall for config file! --- minifirewall | 10 ++++++++-- firewall.rc => minifirewall.conf | 0 2 files changed, 8 insertions(+), 2 deletions(-) rename firewall.rc => minifirewall.conf (100%) diff --git a/minifirewall b/minifirewall index e4dba37..626125f 100755 --- a/minifirewall +++ b/minifirewall @@ -114,7 +114,13 @@ $IPT -A LOG_ACCEPT -j LOG --log-prefix '[IPTABLES ACCEPT] : ' $IPT -A LOG_ACCEPT -j ACCEPT # Configuration -configfile="/etc/firewall.rc" +oldconfigfile="/etc/firewall.rc" +configfile="/etc/default/minifirewall" + +if ! test -f $oldconfigfile; then + echo "$oldconfigfile is deprecated, rename to $configfile" >&2 + exit 1 +fi if ! test -f $configfile; then echo "$configfile does not exist" >&2 @@ -124,7 +130,7 @@ fi tmpfile=`mktemp` . $configfile 2>$tmpfile >&2 if [ -s $tmpfile ]; then - echo "$configfile returns standard or error output (see below). Stopping." + echo "$configfile returns standard or error output (see below). Stopping." >&2 cat $tmpfile exit 1 fi diff --git a/firewall.rc b/minifirewall.conf similarity index 100% rename from firewall.rc rename to minifirewall.conf