diff options
author | Guy Sheffer <guysoft@gmail.com> | 2021-09-09 02:49:15 +0300 |
---|---|---|
committer | Guy Sheffer <guysoft@gmail.com> | 2021-09-09 02:49:15 +0300 |
commit | 1249100b5cf4b205426d509182efbd602c577145 (patch) | |
tree | ac56a544cbff267863e34190099b7b379a5d821d | |
parent | 64c7f714f207e84d5011b365464d25c91ccac30e (diff) |
Add fix for #508 https://github.com/guysoft/OctoPi/issues/508#issuecomment-914501732
-rwxr-xr-x | src/modules/octopi/filesystem/root/etc/network/if-up.d/powersave_off | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/src/modules/octopi/filesystem/root/etc/network/if-up.d/powersave_off b/src/modules/octopi/filesystem/root/etc/network/if-up.d/powersave_off new file mode 100755 index 0000000..9801cf3 --- /dev/null +++ b/src/modules/octopi/filesystem/root/etc/network/if-up.d/powersave_off @@ -0,0 +1,23 @@ +#!/bin/sh + +set -e + +# Don't bother for loopback +if [ "$IFACE" = lo ]; then + exit 0 +fi + +# Only run from ifup. +if [ "$MODE" != start ]; then + exit 0 +fi + +# Only run once +if [ "$ADDRFAM" != meta ]; then + exit 0 +fi + +/usr/sbin/iw dev wlan0 set power_save off + +exit 0 + |