1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/hotspot_ynh.git synced 2024-09-03 19:25:53 +02:00

Fix static mac addr

This commit is contained in:
Julien VAUBOURG 2015-05-02 12:51:57 +02:00
parent adc0d4d3b2
commit 956440e797
2 changed files with 2 additions and 3 deletions

2
TODO
View file

@ -8,7 +8,5 @@
** WEB: check if ipv6 delgated prefixes and ipv4 nat prefixes are unique
** WEB: fix the now broken wifiparty button
** INIT: differentiate ipv6 and ipv4 in is_dhcpd_running
** INIT: do not attribute a static mac address
** INIT: use insserv instead of update-rc.d and update service dependencies
** HARD: try with olimex antenna (no multissid enabled)
** MISC: update vpnclient/torclient for enabling the user to choose the correct ssid

View file

@ -142,7 +142,8 @@ start_dhcpd() {
start_hostapd() {
cp /etc/hostapd/hostapd.conf{.tpl1,}
ip link set addr 02:42:42:13:37:00 dev "${ynh_wifi_device}"
ethaddr=$(ip link show dev "${ynh_wifi_device}" | grep link/ether | awk -F: '{ printf "02:%s:%s:%s:%s:00", $2, $3, $4, $5 }')
ip link set addr "${ethaddr}" dev "${ynh_wifi_device}"
sed "s|<TPL:WIFI_DEVICE>|${ynh_wifi_device}|g" -i /etc/hostapd/hostapd.conf
sed "s|<TPL:WIFI_CHANNEL>|${ynh_wifi_channel}|g" -i /etc/hostapd/hostapd.conf