Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/guysoft/OctoPi.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGuy Sheffer <guysoft@gmail.com>2021-09-09 02:49:15 +0300
committerGuy Sheffer <guysoft@gmail.com>2021-09-09 02:49:15 +0300
commit1249100b5cf4b205426d509182efbd602c577145 (patch)
treeac56a544cbff267863e34190099b7b379a5d821d
parent64c7f714f207e84d5011b365464d25c91ccac30e (diff)
Add fix for #508 https://github.com/guysoft/OctoPi/issues/508#issuecomment-914501732
-rwxr-xr-xsrc/modules/octopi/filesystem/root/etc/network/if-up.d/powersave_off23
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
+