Files
openwrt-R7800-nss/openwrt/package/base-files/default/etc/functions.sh
2006-04-05 02:09:22 +00:00

14 lines
251 B
Bash
Executable File

#!/bin/sh
alias debug=${DEBUG:-:}
# valid interface?
if_valid () (
ifconfig "$1" >&- 2>&- ||
[ "${1%%[0-9]}" = "br" ] ||
{ debug "# missing interface '$1' ignored"; false; }
)
hotplug_dev() {
env -i ACTION=$1 INTERFACE=$2 /sbin/hotplug net
}