Changeset 1809

Show
Ignore:
Timestamp:
30/12/10 17:48:30 (2 years ago)
Author:
matthijs
Message:

fonbase: In firewall.fon, use a subshell for the 40-interzone script.

Previously, this script would be sourced. However, the script does some
checking and uses "exit 0" if it doesn't need to do any work, causing
the calling script (which is the /lib/firewall/uci_firewall.sh script)
to stop executing before the full firewall is loaded.

This issue could only occur when for some reason the wan network was
marked as being up when the Fonera was in bridge mode, so this shouldn't
really occur unless a user has been messing with network settings
manually. However, we'll fix this just to be sure.

References: #983

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/fon/fonbase/files/etc/firewall.fon

    r1807 r1809  
    1515M=`uci get fon.wan.mode 2>/dev/null` 
    1616[ "$W" == "1" ] && { 
    17                         ACTION="ifup" INTERFACE="wan" . /etc/hotplug.d/iface/40-interzone 
     17                        ACTION="ifup" INTERFACE="wan" sh /etc/hotplug.d/iface/40-interzone 
    1818} 
    1919[ "$M" == "bridge" ] && { 
    20                         ACTION="ifup" INTERFACE="lan" . /etc/hotplug.d/iface/40-interzone 
     20                        ACTION="ifup" INTERFACE="lan" sh /etc/hotplug.d/iface/40-interzone 
    2121} 
    2222echo "   FWallDaemon"