c5091fdbb2798a38f4cb68344f88533820e5fb49
3 # /etc/rc.d/net: start/stop network interface
6 # Connection type: "DHCP" or "static"
9 # For "static" connections, specify your settings here:
10 # To see your available devices run "ip link".
17 DHCPOPTS
="-h `/bin/hostname` -t 10"
21 if [ "${TYPE}" = "DHCP" ]; then
22 /sbin
/dhcpcd
${DHCPOPTS}
24 /sbin
/ip addr add
${ADDR}/${MASK} dev
${DEV} broadcast
+
25 /sbin
/ip link
set ${DEV} up
26 /sbin
/ip route add default via
${GW}
30 if [ "${TYPE}" = "DHCP" ]; then
33 /sbin
/ip route del default
34 /sbin
/ip link
set ${DEV} down
35 /sbin
/ip addr del
${ADDR}/${MASK} dev
${DEV}
43 echo "Usage: $0 [start|stop|restart]"