Created
September 28, 2011 23:26
-
-
Save kwilczynski/1249565 to your computer and use it in GitHub Desktop.
Lucid upstart job that will emit fake event ...
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
description "Configure loopback network interface" | |
start on net-device-added INTERFACE=lo | |
stop on net-device-removed INTERFACE=lo | |
pre-start script | |
[ -d /var/run/network ] || /bin/mkdir -p /var/run/network | |
/sbin/ifconfig lo 127.0.0.1 up | |
/sbin/initctl emit -n net-device-up IFACE=lo LOGICAL=lo ADDRFAM=inet METHOD=loopback --no-wait | |
end script | |
post-stop script | |
/sbin/initctl emit -n net-device-down IFACE=lo LOGICAL=lo ADDRFAM=inet METHOD=loopback --no-wait | |
[ -d /var/run/network ] || /bin/rm -rf /var/run/network/* | |
end script |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment