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.
32 lines
643 B
32 lines
643 B
#!/bin/sh
|
|
|
|
case ${1} in
|
|
bound)
|
|
[ -n "$broadcast" ] && BROADCAST="broadcast $broadcast"
|
|
[ -n "$subnet" ] && NETMASK="netmask $subnet"
|
|
[ -n "$rootpath" ] && echo "$rootpath" > /rootpath
|
|
[ -n "$hostname" ] && hostname ${hostname}
|
|
|
|
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
|
|
|