I ended up adding the following udev
rule to my local.rules
file:
KERNEL=="eth2", SUBSYSTEM=="net", SUBSYSTEMS=="usb", DRIVERS=="smsc95xx", RUN+="/home/bin/enableeth2.sh"
The script (/home/bin/enableeth2.sh
) contains the following (and is set to be executable):
#!/bin/bash cd /sbin/ ifup eth2
Note the change of directory to /sbin/
before calling ifup
, instead of just calling /sbin/ifup eth2
. This is necessary since the BusyBox ifup
calls ip
(located in /sbin/
) internally, and since the path apparently isn't set up when the udev
rule runs, ifup
will give an error when trying to do the actual adapter set up.