You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
genkernel_fork/defaults/udhcpc.scripts

33 lines
685 B

#!/bin/sh
case ${1} in
bound)
[ -n "$broadcast" ] && BROADCAST="broadcast $broadcast"
[ -n "$subnet" ] && NETMASK="netmask $subnet"
[ -n "$rootpath" ] && echo "$rootpath" > /rootpath
#[ -n "$router" ] && echo "$router" > /router
#[ -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
;;
esac