2005-11-19 11:17:20 +08:00
|
|
|
#!/bin/sh
|
2005-02-06 08:52:16 +08:00
|
|
|
alias debug=${DEBUG:-:}
|
|
|
|
|
|
|
|
# valid interface?
|
2005-05-30 17:09:58 +08:00
|
|
|
if_valid () (
|
2005-02-06 08:52:16 +08:00
|
|
|
ifconfig "$1" >&- 2>&- ||
|
|
|
|
[ "${1%%[0-9]}" = "br" ] ||
|
2005-05-30 17:09:58 +08:00
|
|
|
{ debug "# missing interface '$1' ignored"; false; }
|
|
|
|
)
|
|
|
|
|
2005-11-19 11:17:20 +08:00
|
|
|
hotplug_dev() {
|
|
|
|
env -i ACTION=$1 INTERFACE=$2 /sbin/hotplug net
|
2005-10-23 04:47:19 +08:00
|
|
|
}
|