diff options
author | Felix Fietkau <nbd@openwrt.org> | 2006-10-03 19:38:34 +0000 |
---|---|---|
committer | Felix Fietkau <nbd@openwrt.org> | 2006-10-03 19:38:34 +0000 |
commit | c379f4a159a68f299d85e66b2ebb96e6da206ca0 (patch) | |
tree | 610fd1c3745333ec153074319fc71dd4a4018db0 /openwrt/package/base-files/default | |
parent | 7cc1e43d9452ecad5b595644de143e0bff8ca624 (diff) | |
download | mtk-20170518-c379f4a159a68f299d85e66b2ebb96e6da206ca0.zip mtk-20170518-c379f4a159a68f299d85e66b2ebb96e6da206ca0.tar.gz mtk-20170518-c379f4a159a68f299d85e66b2ebb96e6da206ca0.tar.bz2 |
don't recreate the resolv.conf file from the dhcp script if no dhcp server is supplied (reported by exobyte)
SVN-Revision: 4903
Diffstat (limited to 'openwrt/package/base-files/default')
-rwxr-xr-x | openwrt/package/base-files/default/usr/share/udhcpc/default.script | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/openwrt/package/base-files/default/usr/share/udhcpc/default.script b/openwrt/package/base-files/default/usr/share/udhcpc/default.script index e048687..74e7037 100755 --- a/openwrt/package/base-files/default/usr/share/udhcpc/default.script +++ b/openwrt/package/base-files/default/usr/share/udhcpc/default.script @@ -37,13 +37,15 @@ case "$1" in route add default gw $i dev $interface done fi - - echo -n > $RESOLV_CONF - ${domain:+echo search $domain} >> $RESOLV_CONF - for i in $dns ; do - echo "adding dns $i" - echo "nameserver $i" >> $RESOLV_CONF - done + + [ -n "$dns" ] && { + echo -n > $RESOLV_CONF + ${domain:+echo search $domain} >> $RESOLV_CONF + for i in $dns ; do + echo "adding dns $i" + echo "nameserver $i" >> $RESOLV_CONF + done + } hotplug_event ifup |