net (381B)
1 #!/bin/sh 2 # 3 # /etc/rc.d/net: start/stop network 4 # 5 6 case $1 in 7 start) 8 # loopback 9 /sbin/ip addr add 127.0.0.1/8 dev lo broadcast + scope host 10 /sbin/ip link set lo up 11 /sbin/dhcpcd -t 10 12 ;; 13 stop) 14 /sbin/dhcpcd -x 15 /sbin/ip link set lo down 16 /sbin/ip addr del 127.0.0.1/8 dev lo 17 ;; 18 restart) 19 $0 stop 20 $0 start 21 ;; 22 *) 23 echo "usage: $0 [start|stop|restart]" 24 ;; 25 esac 26 27 # End of file