commit 1eb11077d356898310e139676fdadb8020de941f parent 3632f29912f6b637e0ac51e3c21bf875357b5031 Author: oblique <psyberbits@gmail.com> Date: Sat, 20 Sep 2014 22:59:40 +0300 Change the mac address of the virtual interface if another interface has the same Diffstat:
M | create_ap | | | 4 | +++- |
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/create_ap b/create_ap @@ -714,7 +714,9 @@ if [[ $NO_VIRT -eq 0 ]]; then die "$VIRTDIEMSG" fi OLD_MACADDR=$(get_macaddr ${VWIFI_IFACE}) - [[ ${OLD_MACADDR} == $(get_macaddr ${WIFI_IFACE}) ]] && NEW_MACADDR=$(get_new_macaddr ${VWIFI_IFACE}) + if [[ $(get_all_macaddrs | grep -c ${OLD_MACADDR}) -ne 1 ]]; then + NEW_MACADDR=$(get_new_macaddr ${VWIFI_IFACE}) + fi WIFI_IFACE=${VWIFI_IFACE} fi