mirror of
https://github.com/archr-linux/Arch-R.git
synced 2026-03-31 14:41:55 -07:00
28 lines
666 B
Bash
Executable File
28 lines
666 B
Bash
Executable File
#!/bin/sh
|
|
|
|
case "$1" in
|
|
deconfig)
|
|
ifconfig $interface 0.0.0.0
|
|
;;
|
|
|
|
renew|bound)
|
|
if [ -n "$dns" ]; then
|
|
rm -f /etc/resolv.conf
|
|
[ -n "$domain" ] && echo "search $domain" >> /etc/resolv.conf
|
|
for ns in $dns; do
|
|
echo "nameserver $ns" >> /etc/resolv.conf
|
|
done
|
|
fi
|
|
[ -n "$broadcast" ] && BROADCAST="broadcast $broadcast"
|
|
[ -n "$subnet" ] && NETMASK="netmask $subnet"
|
|
ifconfig $interface $ip $BROADCAST $NETMASK
|
|
while route del default gw 0.0.0.0 dev $interface; do
|
|
:
|
|
done
|
|
metric=0
|
|
for i in $router; do
|
|
route add default gw $i dev $interface metric $((metric++))
|
|
done
|
|
;;
|
|
esac
|