pmaports/device/testing/device-samsung-manta/wifi-macaddr.sh
Alexandre Marquet db2b912a0a
device-samsung-manta: switch to mainline kernel (MR 4406)
Samsung Manta is now supported by linux-posmarketos-exynos5.
Update device-samsung-manta to use it, and move downstream kernel and
device to unmaintained.

Also adds a script and networkmanager configuration to autoconfigure
WiFi MAC address from /proc/cmdline.

Signed-off-by: Alexandre Marquet <tb@a-marquet.fr>
2023-10-23 08:18:26 +02:00

5 lines
178 B
Bash

#!/bin/sh
macaddr=$(cat /proc/cmdline | sed -n "s/^.*androidboot\.wifimacaddr=\(\([0-9A-Fa-f]\{2\}:\)\{5\}[0-9A-Fa-f]\{2\}\).*$/\1/p")
/sbin/ip link set wlan0 address $macaddr