Upstart network connection event?

xf mail xfmaillist at gmail.com
Thu Jul 8 22:17:01 UTC 2010


Hi all,

I'm writing an Upstart script which would run in the event a network cable
is connected (i.e., the network interface get's an IP address.) However, I
am having trouble figuring out which event I should use for the 'start on'
directive.

Output of 'initctl list | grep network' shows the following networking
related events:

network-manager start/running, process 843
network-interface (lo) start/running
network-interface (eth0) start/running
network-interface (wlan0) start/running
network-interface-security start/running
networking stop/waiting

network-manager starts at boot and doesn't change after that if the cable is
disconnected so taht won't work. Also the network-interface* events stay
started once the system is booted.

The description for 'networking' states "This task causes virtual network
devices that do not have an associated kernel object to be started on boot."
So I'm not sure that is an option.

I'm thinking perhaps there is a udevmonitor event I can use, but again, I'm
not sure which one?

Does anyone have any experience with building scripts like this?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ubuntu.com/archives/ubuntu-users/attachments/20100708/9a1f5754/attachment.html>


More information about the ubuntu-users mailing list