diff options
author | Jo-Philipp Wich <jow@openwrt.org> | 2010-10-04 00:07:07 +0000 |
---|---|---|
committer | Jo-Philipp Wich <jow@openwrt.org> | 2010-10-04 00:07:07 +0000 |
commit | 0fda5f750739ac512b6522575ab3fd6b257af387 (patch) | |
tree | 5f71eee45695bafe9b3178e6e61cc8c0a4eb8d13 /package/base-files/files/usr/share | |
parent | 7eb2c8959cec9160969468653623f3c0c9aa0f54 (diff) | |
download | upstream-0fda5f750739ac512b6522575ab3fd6b257af387.tar.gz upstream-0fda5f750739ac512b6522575ab3fd6b257af387.tar.bz2 upstream-0fda5f750739ac512b6522575ab3fd6b257af387.zip |
base-files: utilize uci_get_state to read the previous dhcp router address in udhcpc default script. The setup_switch() procedure provided by swconfig calls config_load() during network restart and thus confuses udhcpc's uci state keeping resulting in a missing default route on each second network restart. Bypass the cached state vars and query uci directly to make the script immune against unwanted runtime changes.
SVN-Revision: 23211
Diffstat (limited to 'package/base-files/files/usr/share')
-rwxr-xr-x | package/base-files/files/usr/share/udhcpc/default.script | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/package/base-files/files/usr/share/udhcpc/default.script b/package/base-files/files/usr/share/udhcpc/default.script index 92e3474bdd..708f847839 100755 --- a/package/base-files/files/usr/share/udhcpc/default.script +++ b/package/base-files/files/usr/share/udhcpc/default.script @@ -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" } |