diff options
author | Jo-Philipp Wich <jow@openwrt.org> | 2010-09-16 11:47:35 +0000 |
---|---|---|
committer | Jo-Philipp Wich <jow@openwrt.org> | 2010-09-16 11:47:35 +0000 |
commit | f90328f26ef73fc5a0c2d9a751936e9af060ccba (patch) | |
tree | 8b43a2a7814861c1265ad9747419d8ad19be6c9f /package/firewall/files/lib/core_init.sh | |
parent | 4df10391ba87d347aebbcd20e1ab475690f07f80 (diff) | |
download | master-31e0f0ae-f90328f26ef73fc5a0c2d9a751936e9af060ccba.tar.gz master-31e0f0ae-f90328f26ef73fc5a0c2d9a751936e9af060ccba.tar.bz2 master-31e0f0ae-f90328f26ef73fc5a0c2d9a751936e9af060ccba.zip |
firewall: make invalid redirects and duplicate zones non-fatal, print a notice and discard them
SVN-Revision: 23080
Diffstat (limited to 'package/firewall/files/lib/core_init.sh')
-rw-r--r-- | package/firewall/files/lib/core_init.sh | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/package/firewall/files/lib/core_init.sh b/package/firewall/files/lib/core_init.sh index e1f80ba3fc..56e19b7b86 100644 --- a/package/firewall/files/lib/core_init.sh +++ b/package/firewall/files/lib/core_init.sh @@ -42,7 +42,7 @@ fw_load_defaults() { boolean disable_ipv6 0 \ } || return [ -n "$FW_DEFAULTS_APPLIED" ] && { - echo "Error: multiple defaults sections detected" + fw_log error "duplicate defaults section detected, skipping" return 1 } FW_DEFAULTS_APPLIED=1 @@ -159,7 +159,8 @@ fw_load_zone() { fw_config_get_zone "$1" list_contains FW_ZONES $zone_name && { - fw_die "zone ${zone_name}: duplicated zone" + fw_log error "zone ${zone_name}: duplicated zone, skipping" + return 0 } append FW_ZONES $zone_name |