From d560b09b823e5094af9cd6148acd115bfb2c2f41 Mon Sep 17 00:00:00 2001 From: Jouke Witteveen Date: Tue, 3 Apr 2012 12:21:19 +0200 Subject: auto-wireless: improve dhcpcd call MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 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 --- scripts/netcfg-wpa_actiond-action | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'scripts') diff --git a/scripts/netcfg-wpa_actiond-action b/scripts/netcfg-wpa_actiond-action index 3547fef..1f29364 100755 --- a/scripts/netcfg-wpa_actiond-action +++ b/scripts/netcfg-wpa_actiond-action @@ -11,10 +11,12 @@ action="$4" case $action in CONNECT) if [[ -z $profile ]]; then - dhcpcd "$interface" + # Load interface specific config + [[ -f "$IFACE_DIR/$interface" ]] && source "$IFACE_DIR/$interface" + dhcpcd -qL -t "${DHCP_TIMEOUT:-10}" -K $DHCP_OPTIONS "$interface" exit $? fi - if ! $CONN_DIR/ethernet up "$profile"; then + if ! DHCPCD_INTERNAL_OPTIONS="-K" $CONN_DIR/ethernet up "$profile"; then exit 1 # what to do if fail? fi -- cgit v1.2.3-24-g4f1b