no-sleep: initial feature
This feature disabled suspend, sleep, hibernation mode.
This commit is contained in:
parent
c310a1e999
commit
482e11ab9d
3
features.in/no-sleep/README
Normal file
3
features.in/no-sleep/README
Normal file
@ -0,0 +1,3 @@
|
||||
Эта фича отключает спящий и ждущий режимы, а также гибернацию.
|
||||
Нужна для одноплатных компьютеров вроде Raspberry Pi,
|
||||
не поддерживающих их.
|
2
features.in/no-sleep/config.mk
Normal file
2
features.in/no-sleep/config.mk
Normal file
@ -0,0 +1,2 @@
|
||||
use/no-sleep:
|
||||
@$(call add_feature)
|
13
features.in/no-sleep/rootfs/image-scripts.d/50-no-sleep-systemd
Executable file
13
features.in/no-sleep/rootfs/image-scripts.d/50-no-sleep-systemd
Executable file
@ -0,0 +1,13 @@
|
||||
#!/bin/sh -efu
|
||||
|
||||
sleepconf=/etc/systemd/sleep.conf
|
||||
|
||||
test ! -f "$sleepconf" && exit || :
|
||||
cat >> "$sleepconf" <<EOF
|
||||
AllowSuspend=no
|
||||
AllowHibernation=no
|
||||
AllowSuspendThenHibernate=no
|
||||
AllowHybridSleep=no
|
||||
EOF
|
||||
|
||||
exit $?
|
Loading…
Reference in New Issue
Block a user