From 621e8df85b220374ff8d39619a7e889296a5bc3c Mon Sep 17 00:00:00 2001 From: teastep Date: Tue, 23 Jul 2002 23:09:14 +0000 Subject: [PATCH] Issue message when adding an IP address Don't die on lockfile timeout git-svn-id: https://shorewall.svn.sourceforge.net/svnroot/shorewall/trunk@148 fbd18981-670d-0410-9b5c-8dc0c1a9a2bb --- Shorewall/firewall | 3 ++- Shorewall/functions | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/Shorewall/firewall b/Shorewall/firewall index eec90fdc7..e3f522815 100755 --- a/Shorewall/firewall +++ b/Shorewall/firewall @@ -2607,6 +2607,7 @@ add_ip_aliases() # $* = addresses and devices run_ip addr add ${external}${val} dev $interface echo "$external $interface" >> ${STATEDIR}/nat + echo " IP Address $external added to interface $interface" } while [ $# -gt 0 ]; do @@ -3187,7 +3188,7 @@ define_firewall() # $1 = Command (Start or Restart) activate_rules [ -n "$aliases_to_add" ] && \ - echo "Adding IP Aliases..." && \ + echo "Adding IP Addresses..." && \ add_ip_aliases $aliases_to_add run_user_exit start diff --git a/Shorewall/functions b/Shorewall/functions index c5bcd7b57..1949252cf 100755 --- a/Shorewall/functions +++ b/Shorewall/functions @@ -124,7 +124,7 @@ mutex_on() [ -d $STATEDIR ] || mkdir -p $STATEDIR if qt which lockfile; then - lockfile -030 -r1 ${lockf} || exit 2 + lockfile -030 -r1 ${lockf} || rm -f ${lockf} else while [ -f ${lockf} -a ${try} -lt ${max} ] ; do sleep ${int} @@ -136,7 +136,7 @@ mutex_on() echo $$ > ${lockf} else echo "Giving up on lock file ${lockf}" >&2 - exit 2 + rm -f ${lockf} fi fi }