create_ap

create a nat-ed wifi ap
git clone git://git.2f30.org/create_ap
Log | Files | Refs | README | LICENSE

commit 3fe8513d9aa2a456bc56d5f2fc1a4576d655c35b
parent 93d479c1eb3fb2c16281553efc026681cc083662
Author: oblique <psyberbits@gmail.com>
Date:   Sat,  6 Sep 2014 20:33:33 +0300

Handle the case where `unmanaged-devices=' is empty

Fix #45

Diffstat:
Mcreate_ap | 3++-
1 file changed, 2 insertions(+), 1 deletion(-)

diff --git 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