projects
/
openwrt.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
move platform specific base-files into target/linux/<targetname>
[openwrt.git]
/
package
/
base-files
/
default
/
usr
/
share
/
udhcpc
/
default.script
diff --git
a/package/base-files/default/usr/share/udhcpc/default.script
b/package/base-files/default/usr/share/udhcpc/default.script
index
a244e05
..
53c8faf
100755
(executable)
--- a/
package/base-files/default/usr/share/udhcpc/default.script
+++ b/
package/base-files/default/usr/share/udhcpc/default.script
@@
-1,7
+1,7
@@
#!/bin/sh
[ -z "$1" ] && echo "Error: should be run by udhcpc" && exit 1
. /etc/functions.sh
#!/bin/sh
[ -z "$1" ] && echo "Error: should be run by udhcpc" && exit 1
. /etc/functions.sh
-include network
+include
/lib/
network
RESOLV_CONF="/tmp/resolv.conf"
RESOLV_CONF="/tmp/resolv.conf"
@@
-14,7
+14,7
@@
hotplug_event() {
config_get proto $ifc proto
[ "$proto" = "dhcp" ] || continue
config_get proto $ifc proto
[ "$proto" = "dhcp" ] || continue
- env -i ACTION="$1" INTERFACE="$ifname" PROTO=dhcp /sbin/hotplug iface
+ env -i ACTION="$1" INTERFACE="$if
c" DEVICE="$if
name" PROTO=dhcp /sbin/hotplug iface
done
}
done
}
@@
-37,13
+37,15
@@
case "$1" in
route add default gw $i dev $interface
done
fi
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
hotplug_event ifup
This page took
0.021693 seconds
and
4
git commands to generate.