diff options
Diffstat (limited to 'openembedded/packages/linux-hotplug/linux-hotplug-20040920/hotplug-net-agent-usb.patch')
| -rw-r--r-- | openembedded/packages/linux-hotplug/linux-hotplug-20040920/hotplug-net-agent-usb.patch | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/openembedded/packages/linux-hotplug/linux-hotplug-20040920/hotplug-net-agent-usb.patch b/openembedded/packages/linux-hotplug/linux-hotplug-20040920/hotplug-net-agent-usb.patch new file mode 100644 index 0000000000..a64fc50d2b --- /dev/null +++ b/openembedded/packages/linux-hotplug/linux-hotplug-20040920/hotplug-net-agent-usb.patch | |||
| @@ -0,0 +1,43 @@ | |||
| 1 | --- hotplug/etc/hotplug/net.agent 2005-01-13 21:12:47.143597392 +1300 | ||
| 2 | +++ hotplug/etc/hotplug/net.agent 2005-01-13 21:17:57.095477544 +1300 | ||
| 3 | @@ -41,6 +41,9 @@ | ||
| 4 | debug_mesg assuming $INTERFACE is already up | ||
| 5 | exit 0 | ||
| 6 | ;; | ||
| 7 | + # interfaces that don't go up until attached | ||
| 8 | + usbf) | ||
| 9 | + ;; | ||
| 10 | # interfaces that are registered then brought up | ||
| 11 | *) | ||
| 12 | # NOTE: network configuration relies on administered state, | ||
| 13 | @@ -83,6 +86,13 @@ | ||
| 14 | mesg $1 $ACTION event not handled | ||
| 15 | ;; | ||
| 16 | |||
| 17 | +attach) | ||
| 18 | + # ifupdown is dumb and won't bring up an interface that it thinks | ||
| 19 | + # might already be configured. | ||
| 20 | + /sbin/ifdown $INTERFACE | ||
| 21 | + exec /sbin/ifup $INTERFACE | ||
| 22 | + ;; | ||
| 23 | + | ||
| 24 | remove|unregister) | ||
| 25 | case $INTERFACE in | ||
| 26 | # interfaces that are unregistered after being "down" (?) | ||
| 27 | @@ -105,6 +115,16 @@ | ||
| 28 | mesg $1 $ACTION event not handled | ||
| 29 | ;; | ||
| 30 | |||
| 31 | +detach) | ||
| 32 | + if [ -x /sbin/ifdown ]; then | ||
| 33 | + debug_mesg invoke ifdown $INTERFACE | ||
| 34 | + exec /sbin/ifdown $INTERFACE | ||
| 35 | + else | ||
| 36 | + mesg "E: /sbin/ifdown not found. You need to install ifupdown package" | ||
| 37 | + fi | ||
| 38 | + mesg $1 $ACTION event not handled | ||
| 39 | + ;; | ||
| 40 | + | ||
| 41 | *) | ||
| 42 | debug_mesg NET $ACTION event for $INTERFACE not supported | ||
| 43 | exit 1 ;; | ||
