Permalink
Browse files

Do not spoof wlan MAC address on boot

  • Loading branch information...
NEMS Linux
NEMS Linux committed Feb 10, 2019
1 parent 3b33f0e commit 08aa2a8499a3d8b583d0817faae8ae3ce442de3d
Showing with 27 additions and 0 deletions.
  1. +24 −0 build/190-wifi
  2. +3 −0 nems-upgrade/1.4.1-1.5
@@ -0,0 +1,24 @@
#!/bin/bash

# Set Network Manager WiFi MAC address to not change on boot

if [[ -e /etc/NetworkManager/NetworkManager.conf ]]; then # Do this on any board that uses Network Manager

# Detect which is the wireless interface
interface=$(iw dev | awk '$1=="Interface"{print $2}')

# Disable MAC spoofing
if ! grep -q "NEMS00003" /etc/NetworkManager/NetworkManager.conf; then

echo "
# NEMS00003 Set static MAC address for wlan
[device]
wifi.scan-rand-mac-address=no
" >> /etc/NetworkManager/NetworkManager.conf

# Restart the wireless network interface
/sbin/wpa_cli -i $interface reconfigure

fi

fi
@@ -76,6 +76,9 @@ if [[ "$ver" == "1.4.1" ]]; then
## Replace Cockpit Debian theme with NEMS theme
/root/nems/nems-admin/build/171-cockpit

## Don't change MAC address on wlan
/root/nems/nems-admin/build/190-wifi

## Remove webmin
/root/nems/nems-admin/build/220-webmin

0 comments on commit 08aa2a8

Please sign in to comment.