3 alias debug
=${DEBUG:-:}
5 # allow env to override nvram
8 get
) eval "echo \${NVRAM_$2:-\$(command nvram get $2)}";;
12 .
/etc
/nvram.overrides
16 ifconfig
"$1" >&- 2>&- ||
17 [ "${1%%[0-9]}" = "br" ] ||
19 [ "${1%%[0-9]}" = "vlan" ] && (
21 hwname
=$
(nvram get vlan
${i}hwname
)
22 hwaddr
=$
(nvram get
${hwname}macaddr
)
23 [ -z "$hwaddr" ] && return 1
25 vif
=$
(ifconfig
-a |
awk '/^eth.*'$hwaddr'/ {print $1; exit}' IGNORECASE
=1)
26 debug
"# vlan$i => $vif"
28 $DEBUG ifconfig
$vif up
29 $DEBUG vconfig add
$vif $i 2>&-
32 { echo -e "# $1 ignored: can't find/create"; false
; }
This page took 0.045737 seconds and 5 git commands to generate.