Lines 55-60
Link Here
|
55 |
# iproute2 style config vars |
55 |
# iproute2 style config vars |
56 |
eval ipaddr_IFACE=( \"\$\{ipaddr_$iface\[@\]\}\" ) |
56 |
eval ipaddr_IFACE=( \"\$\{ipaddr_$iface\[@\]\}\" ) |
57 |
eval iproute_IFACE=( \"\$\{iproute_$iface\[@\]\}\" ) |
57 |
eval iproute_IFACE=( \"\$\{iproute_$iface\[@\]\}\" ) |
|
|
58 |
eval iptunnel_IFACE=\"\$\{iptunnel_${iface}\}\" |
58 |
|
59 |
|
59 |
# BACKWARD COMPATIBILITY: populate the ifconfig_IFACE array |
60 |
# BACKWARD COMPATIBILITY: populate the ifconfig_IFACE array |
60 |
# if iface_IFACE is set (fex. iface_eth0 instead of ifconfig_eth0) |
61 |
# if iface_IFACE is set (fex. iface_eth0 instead of ifconfig_eth0) |
Lines 85-90
Link Here
|
85 |
local IFACE=${1} i x |
86 |
local IFACE=${1} i x |
86 |
checkconfig || return 1 |
87 |
checkconfig || return 1 |
87 |
|
88 |
|
|
|
89 |
# Do ip tunnel if present in configuration |
90 |
if [[ -z "$(/sbin/ip tunnel show ${1})" && -n ${iptunnel_IFACE} ]]; then |
91 |
ebegin "Configuring tunnel ${IFACE}" |
92 |
/sbin/ip tunnel add ${IFACE} ${tunnel_IFACE} &>${devnull} |
93 |
eend $? || return $? |
94 |
fi |
95 |
|
88 |
# Do dhcp if it is enabled in config |
96 |
# Do dhcp if it is enabled in config |
89 |
if [[ ${ifconfig_IFACE} = dhcp ]] || [[ ${ipaddr_IFACE} = dhcp ]]; then |
97 |
if [[ ${ifconfig_IFACE} = dhcp ]] || [[ ${ipaddr_IFACE} = dhcp ]]; then |
90 |
# Check that eth0 was not brought up by the kernel ... |
98 |
# Check that eth0 was not brought up by the kernel ... |
Lines 250-255
Link Here
|
250 |
/sbin/ip link set dev ${IFACE} down &>${devnull} |
258 |
/sbin/ip link set dev ${IFACE} down &>${devnull} |
251 |
eend $? |
259 |
eend $? |
252 |
fi |
260 |
fi |
|
|
261 |
|
262 |
# Try to destroy tunnel |
263 |
if [[ -n "$(/sbin/ip tunnel show ${IFACE})" ]]; then |
264 |
ebegin "Destroying tunnel ${IFACE}" |
265 |
/sbin/ip tunnel del ${IFACE} &>${devnull} |
266 |
eend $? |
267 |
fi |
253 |
return 0 |
268 |
return 0 |
254 |
} |
269 |
} |
255 |
|
270 |
|