this works, as long as noone renames the wifi card! :)
This commit is contained in:
@@ -1,3 +0,0 @@
|
|||||||
# disable powersave
|
|
||||||
[connection]
|
|
||||||
wifi.powersave = 2
|
|
||||||
6
hardware/raspberrypi/wifi/files/interfaces-wlan0
Normal file
6
hardware/raspberrypi/wifi/files/interfaces-wlan0
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
# SALTSTACK
|
||||||
|
allow-hotplug wlan0
|
||||||
|
iface wlan0 inet dhcp
|
||||||
|
wpa-conf /etc/wpa_supplicant/wpa_supplicant.conf
|
||||||
|
wireless-power off
|
||||||
|
|
||||||
@@ -1,12 +0,0 @@
|
|||||||
#!/bin/sh
|
|
||||||
|
|
||||||
IWCONFIG=/sbin/iwconfig
|
|
||||||
WLAN_IFACE=wlan0
|
|
||||||
|
|
||||||
if [ ! -x $IWCONFIG ]; then
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ "$IFACE" = $WLAN_IFACE ]; then
|
|
||||||
$IWCONFIG $IFACE power off
|
|
||||||
fi
|
|
||||||
@@ -1,22 +1,8 @@
|
|||||||
# disable wifi powermanagement
|
# disable wifi powermanagement
|
||||||
|
|
||||||
nm-conf_d:
|
ifup-wlan0-powersave-off:
|
||||||
file.directory:
|
|
||||||
- name: /etc/NetworkManager/conf.d
|
|
||||||
|
|
||||||
nm-conf_powersave-off:
|
|
||||||
file.managed:
|
file.managed:
|
||||||
- name: /etc/NetworkManager/conf.d/default-wifi-powersave.conf
|
- name: /etc/network/interfaces.d/wlan0
|
||||||
- source:
|
- source:
|
||||||
- salt://hardware/raspberrypi/wifi/files/default-wifi-powersave.conf
|
- salt://hardware/raspberrypi/wifi/files/interfaces-wlan0
|
||||||
- require:
|
|
||||||
- file: /etc/NetworkManager/conf.d
|
|
||||||
|
|
||||||
if-up_powersave-off:
|
|
||||||
file.managed:
|
|
||||||
- name: /etc/network/if-up.d/wifi-powermanagement-off
|
|
||||||
- mode: 0755
|
|
||||||
- source:
|
|
||||||
- salt://hardware/raspberrypi/wifi/files/wifi-powermanagement-off
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user