base-files: cached state vars after scan_interfaces might be out of sync when binding...
authorJo-Philipp Wich <jow@openwrt.org>
Sun, 19 Sep 2010 15:04:08 +0000 (15:04 +0000)
committerJo-Philipp Wich <jow@openwrt.org>
Sun, 19 Sep 2010 15:04:08 +0000 (15:04 +0000)
SVN-Revision: 23091

package/base-files/files/usr/share/udhcpc/default.script

index 39527778ad1973cd1206ead85fd8e404bcf2f268..92e3474bddc7878b1935e4a3cba45d62e85593da 100755 (executable)
@@ -21,9 +21,9 @@ setup_interface () {
        local user_router
 
        [ -n "$ifc" ] && {
-               config_get old_ip        "$ifc" ipaddr
-               config_get old_broadcast "$ifc" broadcast
-               config_get old_subnet    "$ifc" netmask
+               old_ip="$(uci_get_state network "$ifc" ipaddr)"
+               old_broadcast="$(uci_get_state network "$ifc" broadcast)"
+               old_subnet="$(uci_get_state network "$ifc" netmask)"
        }
 
        [ "$ip" != "$old_ip" ] \