Activity log for bug #998388

Date Who What changed Old value New value Message
2012-05-12 10:05:44 muzzol bug added bug
2012-05-12 14:38:54 muzzol description I want to execute a script when network (any interface) goes up and when goes down (with parameters). I've found easy to trigger first part with start on (net-device-up IFACE!=lo) but didn't manage to found an easy way to trigger either net-device-down, net-device-remove(d) , deconfiguring-networking my job loks like this: ################################################################## description "network test" start on (net-device-up IFACE!=lo) # stop on ((net-device-down IFACE!=lo) or deconfiguring-networking) stop on net-device-removed IFACE!=lo pre-start exec /opt/test.sh start "$UPSTART_JOB - EVENT: $UPSTART_EVENTS" post-stop exec /opt/test.sh stop "$UPSTART_JOB - EVENT: $UPSTART_STOP_EVENTS" ################################################################## to test it I just go to nm-applet and deactivate one interface. I've finally managed to make it work creating a simple script in '/etc/network/if-post-down.d' to force emmiting the signal. something like this: ######################################## #!/bin/sh [ "$IFACE" != "lo" ] || exit 0 initctl emit -n net-device-removed IFACE=$IFACE ######################################## I'm not sure if this is expecte behaviour, if this is a feature request or if it's a real bug, but for company pourposes I really need to emit a signal when any interface (not lo) goes down. please, ask for further info I want to execute a script when network (any interface) goes up and when goes down (with parameters). I've found easy to trigger first part with     start on (net-device-up IFACE!=lo) but didn't manage to found an easy way to trigger either net-device-down, net-device-remove(d) , deconfiguring-networking my job loks like this: ################################################################## description "network test" start on (net-device-up IFACE!=lo) # stop on ((net-device-down IFACE!=lo) or deconfiguring-networking) stop on net-device-removed IFACE!=lo pre-start exec /opt/test.sh start "$UPSTART_JOB - EVENT: $UPSTART_EVENTS" post-stop exec /opt/test.sh stop "$UPSTART_JOB - EVENT: $UPSTART_STOP_EVENTS" ################################################################## to test it I just go to nm-applet and deactivate one interface. I've finally managed to make it work creating a simple script in '/etc/network/if-post-down.d' to force emmiting the signal. something like this: ######################################## #!/bin/sh [ "$IFACE" != "lo" ] || exit 0 initctl emit -n net-device-removed IFACE=$IFACE ######################################## I'm not sure if this is expecte behaviour, if this is a feature request or if it's a real bug, but for company pourposes I really need to emit a signal when any interface (not lo) goes down. please, ask for further info EDITED: I can see here https://lists.ubuntu.com/archives/upstart-devel/2011-January/001379.html that '/etc/network/if-down.d/upstart' should emit net-device-down but in my case that's not true. so maybe the bug should be: event not emited by '/etc/network/if-down.d/upstart'
2012-05-12 19:57:34 muzzol summary emmit signal when network-manager deconfigures interface emit signal when network-manager deconfigures interface
2012-05-12 19:59:25 muzzol summary emit signal when network-manager deconfigures interface emit net-device-down signal when network-manager deconfigures interface
2012-09-09 10:13:01 Steve Langasek affects upstart network-manager (Ubuntu)
2013-04-14 17:07:04 Launchpad Janitor network-manager (Ubuntu): status New Confirmed
2013-08-07 06:40:02 cleary bug added subscriber cleary
2015-10-03 12:26:38 Istvan bug added subscriber Lapat Bela