summaryrefslogtreecommitdiffstats
path: root/src/lib
diff options
context:
space:
mode:
authorJouke Witteveen <j.witteveen@gmail.com>2013-04-10 20:33:38 +0200
committerJouke Witteveen <j.witteveen@gmail.com>2013-04-10 20:33:38 +0200
commitaa20dd1eaeecd73e52d656ac3ca4d1a2a558edba (patch)
treecee0cc68ccc075d5cc14333f86beac0747aa1b4a /src/lib
parent0f36b0b8553e540e37cab99666a2a577fefdf12c (diff)
downloadnetctl-aa20dd1eaeecd73e52d656ac3ca4d1a2a558edba.tar.gz
netctl-aa20dd1eaeecd73e52d656ac3ca4d1a2a558edba.tar.xz
Fix DHCPOptions
Split them into different variables for different clients. Also, IP6 gets its own, so that it can have options different from the IP4 invocation.
Diffstat (limited to 'src/lib')
-rwxr-xr-xsrc/lib/auto.action4
-rw-r--r--src/lib/ip6
2 files changed, 5 insertions, 5 deletions
diff --git a/src/lib/auto.action b/src/lib/auto.action
index 6cb6ff5..feebd77 100755
--- a/src/lib/auto.action
+++ b/src/lib/auto.action
@@ -17,10 +17,10 @@ case $action in
if [[ -x "$PROFILE_DIR/interfaces/$interface" ]]; then
source "$PROFILE_DIR/interfaces/$interface"
fi
- dhcpcd -qL -t "${TimeoutDHCP:-10}" $DHCPOptions -K "$interface"
+ dhcpcd -qL -t "${TimeoutDHCP:-10}" $DhcpcdOptions -K "$interface"
exit $?
fi
- DHCPOptions+=" -K"
+ DhcpcdOptions+=" -K"
ip_set || exit 1
# JP: sandbox the eval
if ! ( eval $ExecUpPost ); then
diff --git a/src/lib/ip b/src/lib/ip
index 8723e5b..c1f1fc7 100644
--- a/src/lib/ip
+++ b/src/lib/ip
@@ -30,7 +30,7 @@ ip_set() {
rm -f "/run/dhcpcd-$Interface".{pid,cache}
# If using own dns, tell dhcpcd to NOT replace resolv.conf
[[ $DNS ]] && DhcpcdOptions+=" -C resolv.conf"
- do_debug dhcpcd -qL -t "${TimeoutDHCP:-10}" $DHCPOptions "$Interface" 2>&1 | report_debug "$(cat)"
+ do_debug dhcpcd -qL -t "${TimeoutDHCP:-10}" $DhcpcdOptions "$Interface" 2>&1 | report_debug "$(cat)"
# The first array value of PIPESTATUS is the exit status of dhcpcd
if (( PIPESTATUS != 0 )); then
report_error "DHCP IP lease attempt failed on interface '$Interface'"
@@ -107,9 +107,9 @@ ip_set() {
return 1
fi
sysctl -q -w "net.ipv6.conf.$interface_sysctl.accept_ra=1"
- [[ $IP6 == "dhcp-noaddr" ]] && Dhclient6Options+=" -S"
+ [[ $IP6 == "dhcp-noaddr" ]] && DhclientOptions6+=" -S"
rm -f "/run/dhclient6-${Interface}.pid"
- if ! do_debug dhclient -6 -q -e "TIMEOUT=${TimeoutDHCP:-10}" -pf "$Pidfile" $Dhclient6Options "$Interface"; then
+ if ! do_debug dhclient -6 -q -e "TIMEOUT=${TimeoutDHCP:-10}" -pf "/run/dhclient6-${Interface}.pid" $DhclientOptions6 "$Interface"; then
report_error "DHCPv6 IP lease attempt failed on interface '$Interface'"
return 1
fi