vif=$(ifconfig -a | awk '/^eth.*'$hwaddr'/ {print $1; exit}' IGNORECASE=1)
debug "# vlan$i => $vif"
+ [ -n "$vif" ] || vif=$(ifconfig -a | awk '/^eth'${hw##et}'/ {print $1; exit}' IGNORECASE=1)
$DEBUG ifconfig $vif up
$DEBUG vconfig add $vif $i 2>&-
[ -n "$static_route" ] && {
for route in $static_route; do {
eval "set $(echo $route | sed 's/:/ /g')"
- if [ "$2" = "255.255.255.255" ]; then
+ if [ "$2" = "0.0.0.0" ]; then
opt="-host"
fi
$DEBUG route add ${opt:-"-net"} $1 netmask $2 gw $3 metric $4
+ unset opt
} done
}