Lines 37-42
Link Here
|
37 |
# vlans_IFACE (space-separated list) |
37 |
# vlans_IFACE (space-separated list) |
38 |
# ifconfig_IFACE (array of ifconfig lines, replaces iface_IFACE) |
38 |
# ifconfig_IFACE (array of ifconfig lines, replaces iface_IFACE) |
39 |
# dhcpcd_IFACE (command-line args for dhcpcd) |
39 |
# dhcpcd_IFACE (command-line args for dhcpcd) |
|
|
40 |
# clearip_IFACE (delete IP cache file before DHCPing if set) |
40 |
# routes_IFACE (array of route lines) |
41 |
# routes_IFACE (array of route lines) |
41 |
# inet6_IFACE (array of inet6 lines) |
42 |
# inet6_IFACE (array of inet6 lines) |
42 |
setup_vars() { |
43 |
setup_vars() { |
Lines 46-51
Link Here
|
46 |
eval vlans_IFACE=\"\$\{iface_${iface}_vlans\}\" |
47 |
eval vlans_IFACE=\"\$\{iface_${iface}_vlans\}\" |
47 |
eval ifconfig_IFACE=( \"\$\{ifconfig_$iface\[@\]\}\" ) |
48 |
eval ifconfig_IFACE=( \"\$\{ifconfig_$iface\[@\]\}\" ) |
48 |
eval dhcpcd_IFACE=\"\$\{dhcpcd_$iface\}\" |
49 |
eval dhcpcd_IFACE=\"\$\{dhcpcd_$iface\}\" |
|
|
50 |
eval clearip_IFACE=\"\$\{clearip_$iface\}\" |
49 |
eval routes_IFACE=( \"\$\{routes_$iface\[@\]\}\" ) |
51 |
eval routes_IFACE=( \"\$\{routes_$iface\[@\]\}\" ) |
50 |
eval inet6_IFACE=( \"\$\{inet6_$iface\[@\]\}\" ) |
52 |
eval inet6_IFACE=( \"\$\{inet6_$iface\[@\]\}\" ) |
51 |
|
53 |
|
Lines 78-83
Link Here
|
78 |
local IFACE=${1} i x |
80 |
local IFACE=${1} i x |
79 |
checkconfig || return 1 |
81 |
checkconfig || return 1 |
80 |
|
82 |
|
|
|
83 |
# Check if we should clear the IP address of that interface before DHCPing |
84 |
if [[ ! -z ${clearip_IFACE} ]]; then |
85 |
einfo "Clearing cached IP for ${IFACE}" |
86 |
if [[ -f "/var/cache/dhcpcd-${IFACE}.cache" ]]; then |
87 |
rm "/var/cache/dhcpcd-${IFACE}.cache" |
88 |
fi |
89 |
fi |
90 |
|
81 |
if [[ ${ifconfig_IFACE} != dhcp ]]; then |
91 |
if [[ ${ifconfig_IFACE} != dhcp ]]; then |
82 |
# Show the address, but catch if this interface will be inet6 only |
92 |
# Show the address, but catch if this interface will be inet6 only |
83 |
i=${ifconfig_IFACE%% *} |
93 |
i=${ifconfig_IFACE%% *} |