diff options
-rw-r--r-- | src/network | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/network b/src/network index 8b1c088..7009893 100644 --- a/src/network +++ b/src/network @@ -257,12 +257,12 @@ interface_down() check_iface() { if [[ -f "$STATE_DIR/interfaces/$1" ]]; then ( . "$STATE_DIR/interfaces/$1" - if [[ "$PROFILE" -eq external ]]; then + if [[ "$PROFILE" == "external" ]]; then echo "external" else echo "up" fi - return 0 + exit 0 ) else return 1 @@ -274,7 +274,7 @@ check_iface() { # Return 1 if down. # get_iface_prof() { - if check_iface "$1"; then + if check_iface "$1" &>/dev/null; then . "$STATE_DIR/interfaces/$1" echo "$PROFILE" else @@ -293,7 +293,7 @@ list_profiles() { # Return 1 if profile not registered # check_profile() { - [[ -f "$STATE_DIR/profiles/$1" && ! -f "$STATE_DIR/suspend/$1" ]] && return 0 + [[ -f "$STATE_DIR/profiles/$1" ]] && return 0 return 1 } |