commit ed78f36f41419fe088ff7a8760fa1cf1aadf1431 parent 1eb11077d356898310e139676fdadb8020de941f Author: oblique <psyberbits@gmail.com> Date: Sat, 20 Sep 2014 23:45:10 +0300 Revert 488f84e since f589df0 provides a better solution Diffstat:
M | create_ap | | | 31 | ------------------------------- |
1 file changed, 0 insertions(+), 31 deletions(-)
diff --git a/create_ap b/create_ap @@ -118,23 +118,6 @@ get_phy_device() { return 1 } -get_virt_interfaces() { - PHY=$(get_phy_device "$1") - - if [[ -e "/sys/class/ieee80211/${PHY}/device/net/" ]]; then - for x in /sys/class/ieee80211/${PHY}/device/net/*; do - [[ ! -e "$x" ]] && continue - echo ${x##*/} - done - return - fi - - for x in /sys/class/ieee80211/${PHY}/device/net:*; do - [[ ! -e "$x" ]] && continue - echo ${x##*:} - done -} - get_adapter_info() { PHY=$(get_phy_device "$1") [[ $? -ne 0 ]] && return 1 @@ -691,21 +674,7 @@ if [[ $NO_VIRT -eq 0 ]]; then Try again with --no-virt." echo -n "Creating a virtual WiFi interface... " - VIRT_IFACES=" $(get_virt_interfaces ${WIFI_IFACE}) " if iw dev ${WIFI_IFACE} interface add ${VWIFI_IFACE} type __ap; then - # some distributions (such as Ubuntu) have udev rules that they rename - # the new virtual interface. in this case, forcefully rename it back - # to the name we want - if ! is_wifi_interface ${VWIFI_IFACE}; then - for x in $(get_virt_interfaces ${WIFI_IFACE}); do - if [[ "$VIRT_IFACES" != *\ ${x}\ * ]]; then - ip link set dev $x down || die - ip link set dev $x name $VWIFI_IFACE || die - break - fi - done - fi - # now we can call networkmanager_wait_until_unmanaged networkmanager_is_running && [[ $NM_OLDER_VERSION -eq 0 ]] && networkmanager_wait_until_unmanaged ${VWIFI_IFACE} echo "${VWIFI_IFACE} created."