diff --git a/create_ap b/create_ap index 8ee8d4d..da6c5aa 100755 --- a/create_ap +++ b/create_ap @@ -229,9 +229,10 @@ networkmanager_add_unmanaged() { [[ -z "$MAC" ]] && return 1 fi - UNMANAGED=$(grep -m1 -Eo '^unmanaged-devices=[[:alnum:]:;,-]*' /etc/NetworkManager/NetworkManager.conf | sed 's/unmanaged-devices=//' | tr ';,' ' ') + UNMANAGED=$(grep -m1 -Eo '^unmanaged-devices=[[:alnum:]:;,-]*' /etc/NetworkManager/NetworkManager.conf) WAS_EMPTY=0 [[ -z "$UNMANAGED" ]] && WAS_EMPTY=1 + UNMANAGED=$(echo "$UNMANAGED" | sed 's/unmanaged-devices=//' | tr ';,' ' ') for x in $UNMANAGED; do [[ $x == "mac:${MAC}" ]] && return 2