Skip to content

Instantly share code, notes, and snippets.

Created March 23, 2014 11:48
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save anonymous/9722037 to your computer and use it in GitHub Desktop.
Save anonymous/9722037 to your computer and use it in GitHub Desktop.
lo
#!/bin/sh
#
# /etc/rc.d/lo: start/stop loopback interface
#
case $1 in
start)
# loopback
/sbin/ip addr add 127.0.0.1/8 dev lo broadcast + scope host
/sbin/ip link set lo up
;;
stop)
/sbin/ip link set lo down
/sbin/ip addr del 127.0.0.1/8 dev lo
;;
restart)
$0 stop
$0 start
;;
*)
echo "usage: $0 [start|stop|restart]"
;;
esac
# End of file
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment