wlan-ap-Telecominfraproject/feeds/wlan-ap/wlan-ap-config/files/etc/uci-defaults/90-tip-hostname
John Crispin 5801193ec0 wlan-ap-config: set hostname
Use OpenAp-${eth0_mac:6} as default hostname.

Signed-off-by: John Crispin <john@phrozen.org>
2020-07-24 09:43:28 +02:00

8 lines
142 B
Bash

#!/bin/sh
MAC=$(cat /sys/class/net/eth0/address | tr -d ":")
uci set system.@system[-1].hostname="OpenAp-${MAC:6}"
uci commit system
exit 0