diff options
author | Jouke Witteveen <j.witteveen@gmail.com> | 2012-04-03 12:21:19 +0200 |
---|---|---|
committer | Jouke Witteveen <j.witteveen@gmail.com> | 2012-04-03 12:21:19 +0200 |
commit | d560b09b823e5094af9cd6148acd115bfb2c2f41 (patch) | |
tree | c6312e55fe65b320fb15b4d0279e6edc3b623479 /src/connections | |
parent | 3fab6603d9e31b8887e2d7787edd3da32df425e9 (diff) | |
download | netctl-d560b09b823e5094af9cd6148acd115bfb2c2f41.tar.gz netctl-d560b09b823e5094af9cd6148acd115bfb2c2f41.tar.xz |
auto-wireless: improve dhcpcd call
- Use "-K" to prevent unnecessary remove/re-acquire a lease.
- Respect /etc/network.d/interfaces/$interface and the dhcp options set there when connecting without a matching profile. Also use the same options used in $CONN_DIR/ethernet.
Fixes by Thomas Bächler
Diffstat (limited to 'src/connections')
-rw-r--r-- | src/connections/ethernet | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/connections/ethernet b/src/connections/ethernet index 3e4a992..420dd1e 100644 --- a/src/connections/ethernet +++ b/src/connections/ethernet @@ -83,8 +83,8 @@ ethernet_up() { # If using own dns, tell dhcpcd to NOT replace resolv.conf [[ -n "$DNS" ]] && DHCP_OPTIONS="-C resolv.conf $DHCP_OPTIONS" # Start dhcpcd - report_debug ethernet_up dhcpcd -qL -t "${DHCP_TIMEOUT:-10}" $DHCP_OPTIONS "$INTERFACE" - dhcpcd -qL -t "${DHCP_TIMEOUT:-10}" $DHCP_OPTIONS "$INTERFACE" 2>&1 | report_debug "$(cat)" + report_debug ethernet_up dhcpcd -qL -t "${DHCP_TIMEOUT:-10}" $DHCPCD_INTERNAL_OPTIONS $DHCP_OPTIONS "$INTERFACE" + dhcpcd -qL -t "${DHCP_TIMEOUT:-10}" $DHCPCD_INTERNAL_OPTIONS $DHCP_OPTIONS "$INTERFACE" 2>&1 | report_debug "$(cat)" if [[ "$PIPESTATUS" -ne 0 ]]; then report_fail "DHCP IP lease attempt failed." stop_80211x |