WARNING: THIS SITE IS A MIRROR OF GITHUB.COM / IT CANNOT LOGIN OR REGISTER ACCOUNTS / THE CONTENTS ARE PROVIDED AS-IS / THIS SITE ASSUMES NO RESPONSIBILITY FOR ANY DISPLAYED CONTENT OR LINKS / IF YOU FOUND SOMETHING MAY NOT GOOD FOR EVERYONE, CONTACT ADMIN AT ilovescratch@foxmail.com
Skip to content

Commit 8426dbc

Browse files
committed
Disable all suspend operations systemwide
1 parent 2097b0a commit 8426dbc

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

lib/functions/rootfs/distro-specific.sh

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,15 @@ function install_distribution_specific() {
5151
HandleHibernateKey=ignore
5252
HandlePowerKey=ignore
5353
EOF
54+
# Tell systemd there is NO suspend/hibernate at all
55+
mkdir -p "${SDCARD}/etc/systemd/sleep.conf.d"
56+
cat <<- EOF > "${SDCARD}/etc/systemd/sleep.conf.d/00-disable.conf"
57+
[Sleep]
58+
AllowSuspend=no
59+
AllowHibernation=no
60+
AllowHybridSleep=no
61+
AllowSuspendThenHibernate=no
62+
EOF
5463
fi
5564

5665
# install our base-files package (this replaces the original from Debian/Ubuntu)

0 commit comments

Comments
 (0)