summaryrefslogtreecommitdiff
path: root/net-profile
diff options
context:
space:
mode:
authorpks <pks@pks.rocks>2021-02-23 15:07:00 +0100
committerpks <pks@pks.rocks>2021-02-23 15:07:00 +0100
commit796f6c752e36e6fa5a94babffeb23f685bd7a028 (patch)
tree4778eca00799c3c60900a6abd828e372298c8bae /net-profile
parent130b0f0f925ad436d1ae0c45b92ef74694cae29e (diff)
net-profile: fix
Diffstat (limited to 'net-profile')
-rwxr-xr-xnet-profile6
1 files changed, 3 insertions, 3 deletions
diff --git a/net-profile b/net-profile
index 2308fd5..a5beaa5 100755
--- a/net-profile
+++ b/net-profile
@@ -1,14 +1,14 @@
#!/bin/sh
-DEV=`ls -1 /sys/class/net | grep wlan`
+DEV=`ls -1 /sys/class/net | grep wifi`
if [[ $DEV == "" ]]; then
- DEV=`ls -1 /sys/class/net | grep wlp`
+ DEV=`ls -1 /sys/class/net | grep wlan`
fi
setup_wifi()
{
if [[ $1 != "home" ]]; then
- macchanger -r wlan0
+ sudo macchanger -e $DEV
fi
sudo wpa_supplicant -i $DEV -c ~/.net_profiles/$1.conf &>/tmp/wpa_supplicant.log &
sudo /etc/init.d/dhcpcd start