base-files: utilize uci_get_state to read the previous dhcp router address in udhcpc...
authorJo-Philipp Wich <jow@openwrt.org>
Mon, 4 Oct 2010 00:07:07 +0000 (00:07 +0000)
committerJo-Philipp Wich <jow@openwrt.org>
Mon, 4 Oct 2010 00:07:07 +0000 (00:07 +0000)
SVN-Revision: 23211

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

index b8ff8dd3713f15863b4ce0af3ba070904e428786..1f510df096eaf8fb3e26f557a04aa6b2d17c900b 100644 (file)
@@ -10,7 +10,7 @@ include $(TOPDIR)/rules.mk
 include $(INCLUDE_DIR)/kernel.mk
 
 PKG_NAME:=base-files
-PKG_RELEASE:=56
+PKG_RELEASE:=57
 
 PKG_FILE_DEPENDS:=$(PLATFORM_DIR)/ $(GENERIC_PLATFORM_DIR)/base-files/
 PKG_BUILD_DEPENDS:=opkg/host
index 92e3474bddc7878b1935e4a3cba45d62e85593da..708f847839f79985c283eae2ce8a771a37e53f96 100755 (executable)
@@ -41,8 +41,8 @@ setup_interface () {
        # Default Route
        [ -n "$ifc" ] && {
                change_state network "$ifc" lease_gateway "$router"
-               config_get old_router "$ifc" gateway
-               user_router=$(uci_get "network.$ifc.gateway")
+               old_router="$(uci_get_state network "$ifc" gateway)"
+               user_router="$(uci_get network "$ifc" gateway)"
                [ -n "$user_router" ] && router="$user_router"
        }