|
|
@ -228,16 +228,17 @@ setup_interface_static() { |
|
|
|
config_get ip6addr "$config" ip6addr |
|
|
|
config_get ip6addr "$config" ip6addr |
|
|
|
[ -z "$ipaddr" -o -z "$netmask" ] && [ -z "$ip6addr" ] && return 1 |
|
|
|
[ -z "$ipaddr" -o -z "$netmask" ] && [ -z "$ip6addr" ] && return 1 |
|
|
|
|
|
|
|
|
|
|
|
local gateway ip6gw dns bcast |
|
|
|
local gateway ip6gw dns bcast metric |
|
|
|
config_get gateway "$config" gateway |
|
|
|
config_get gateway "$config" gateway |
|
|
|
config_get ip6gw "$config" ip6gw |
|
|
|
config_get ip6gw "$config" ip6gw |
|
|
|
config_get dns "$config" dns |
|
|
|
config_get dns "$config" dns |
|
|
|
config_get bcast "$config" broadcast |
|
|
|
config_get bcast "$config" broadcast |
|
|
|
|
|
|
|
config_get metric "$config" metric |
|
|
|
|
|
|
|
|
|
|
|
[ -z "$ipaddr" ] || $DEBUG ifconfig "$iface" "$ipaddr" netmask "$netmask" broadcast "${bcast:-+}" |
|
|
|
[ -z "$ipaddr" ] || $DEBUG ifconfig "$iface" "$ipaddr" netmask "$netmask" broadcast "${bcast:-+}" |
|
|
|
[ -z "$ip6addr" ] || $DEBUG ifconfig "$iface" add "$ip6addr" |
|
|
|
[ -z "$ip6addr" ] || $DEBUG ifconfig "$iface" add "$ip6addr" |
|
|
|
[ -z "$gateway" ] || $DEBUG route add default gw "$gateway" dev "$iface" |
|
|
|
[ -z "$gateway" ] || $DEBUG route add default gw "$gateway" ${metric:+metric $metric} dev "$iface" |
|
|
|
[ -z "$ip6gw" ] || $DEBUG route -A inet6 add default gw "$ip6gw" dev "$iface" |
|
|
|
[ -z "$ip6gw" ] || $DEBUG route -A inet6 add default gw "$ip6gw" ${metric:+metric $metric} dev "$iface" |
|
|
|
[ -z "$dns" ] || add_dns "$config" $dns |
|
|
|
[ -z "$dns" ] || add_dns "$config" $dns |
|
|
|
|
|
|
|
|
|
|
|
config_get type "$config" TYPE |
|
|
|
config_get type "$config" TYPE |
|
|
|