aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoragaffney <agaffney@kagome.(none)>2008-07-29 07:31:43 -0500
committeragaffney <agaffney@kagome.(none)>2008-07-29 07:31:43 -0500
commit2f1aaf499595a99dc3e88e5ac5eca7ce69bdc418 (patch)
tree49baec480b874eb4fe0287fa8859b9898c5159ff /defaults/udhcpc.scripts
parentRemove check for >=2.6 for mounting sysfs (diff)
downloadgenkernel-2f1aaf499595a99dc3e88e5ac5eca7ce69bdc418.tar.gz
genkernel-2f1aaf499595a99dc3e88e5ac5eca7ce69bdc418.tar.bz2
genkernel-2f1aaf499595a99dc3e88e5ac5eca7ce69bdc418.zip
Add support to udhcpc.scripts for default route and DNS servers/domain
Diffstat (limited to 'defaults/udhcpc.scripts')
-rw-r--r--defaults/udhcpc.scripts15
1 files changed, 15 insertions, 0 deletions
diff --git a/defaults/udhcpc.scripts b/defaults/udhcpc.scripts
index a108a8b..1890f8a 100644
--- a/defaults/udhcpc.scripts
+++ b/defaults/udhcpc.scripts
@@ -9,6 +9,21 @@ case ${1} in
#[ -n "$dns" ] && echo "$dns" > /dns
busybox ifconfig $interface $ip $BROADCAST $NETMASK
+ if [ -n "${router}" ]
+ then
+ for i in ${router}
+ do
+ busybox route add default gw ${i}
+ done
+ fi
+ [ -n "$domain" ] && echo "domain ${domain}" >> /etc/resolv.conf
+ if [ -n "${dns}" ]
+ then
+ for i in ${dns}
+ do
+ echo "nameserver ${i}" >> /etc/resolv.conf
+ done
+ fi
;;
deconfig)
busybox ifconfig $interface 0.0.0.0