diff options
| author | tranch <tranch.xiao@gmail.com> | 2026-08-14 11:58:13 +0800 |
|---|---|---|
| committer | tranch <tranch.xiao@gmail.com> | 2026-08-14 13:22:40 +0800 |
| commit | 959986e9d96c65fab30da939005a6880dfa77d52 (patch) | |
| tree | 39d79cee9b1daa3a474147c9b590537001016af7 /build_files/build.sh | |
| parent | 9f0caea4747a850dd21cc93a35962367f2309b2c (diff) | |
| download | AeroCore-OS-959986e9d96c65fab30da939005a6880dfa77d52.tar.gz AeroCore-OS-959986e9d96c65fab30da939005a6880dfa77d52.zip | |
Enable HDMI CEC sleep standby by default
Diffstat (limited to 'build_files/build.sh')
| -rwxr-xr-x | build_files/build.sh | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/build_files/build.sh b/build_files/build.sh index 03adff0..5618d20 100755 --- a/build_files/build.sh +++ b/build_files/build.sh @@ -14,6 +14,20 @@ esac # Copy the contents of system_files/ of the git repo to / cp -avf "/ctx/system_files"/. / +# Default HDMI-CEC to putting the TV into standby when the system sleeps. +# `ujust toggle-cec-sleep enable` changes this same setting at runtime. Keep +# the default in the base image's config so users do not need to run the +# command manually after a fresh install; the runtime command can still +# change it later. +CEC_CONFIG=/etc/default/cec-control +if [[ -f "${CEC_CONFIG}" ]]; then + if grep -q '^CEC_ONSLEEP_STANDBY=' "${CEC_CONFIG}"; then + sed -i 's/^CEC_ONSLEEP_STANDBY=.*/CEC_ONSLEEP_STANDBY=true/' "${CEC_CONFIG}" + else + printf '%s\n' 'CEC_ONSLEEP_STANDBY=true' >> "${CEC_CONFIG}" + fi +fi + mkdir -p /etc/environment.d if [[ -n "${FLATPAK_REMOTE_URL:-}" || -n "${HOMEBREW_BOTTLE_DOMAIN:-}" || -n "${HOMEBREW_API_DOMAIN:-}" ]]; then |
