diff options
-rwxr-xr-x | scripts/netcfg | 1 | ||||
-rw-r--r-- | src/connections/ethernet | 2 | ||||
-rw-r--r-- | src/network | 1 |
3 files changed, 1 insertions, 3 deletions
diff --git a/scripts/netcfg b/scripts/netcfg index f286796..65e4d62 100755 --- a/scripts/netcfg +++ b/scripts/netcfg @@ -82,7 +82,6 @@ case "$1" in rm "$STATE_DIR/interfaces"/* 2> /dev/null rm "$STATE_DIR/profiles"/* 2> /dev/null rm "$STATE_DIR/suspend"/* 2> /dev/null - rm "$STATE_DIR/last_profile" 2> /dev/null killall wpa_supplicant 2> /dev/null killall dhcpcd 2> /dev/null ;; diff --git a/src/connections/ethernet b/src/connections/ethernet index 24e92d5..834b333 100644 --- a/src/connections/ethernet +++ b/src/connections/ethernet @@ -34,7 +34,7 @@ ethernet_up() { if ! checkyesno "${SKIPNOCARRIER:-no}"; then # Some cards are plain slow to come up. Don't fail immediately. - if ! timeout_wait "${CARRIER_TIMEOUT:-5}" '! ip link show dev "$INTERFACE" | fgrep -q "NO-CARRIER"'; then + if ! timeout_wait "${CARRIER_TIMEOUT:-5}" '(( $(< "/sys/class/net/$INTERFACE/carrier") ))'; then report_iproute "No connection" fi fi diff --git a/src/network b/src/network index 02d74d7..8ca90ec 100644 --- a/src/network +++ b/src/network @@ -328,7 +328,6 @@ set_profile() { if [[ "$1" == "up" ]]; then INTERFACE=$(. "$PROFILE_DIR/$2"; echo "$INTERFACE") cp "$PROFILE_DIR/$2" "$STATE_DIR/profiles/" - echo "$2" > "$STATE_DIR/last_profile" set_iface up "$INTERFACE" "$2" elif [[ "$1" == "down" && -f "$STATE_DIR/profiles/$2" ]]; then # JP: skip if profile not already up INTERFACE=$(. "$STATE_DIR/profiles/$2"; echo "$INTERFACE") |