systemd: let logind handle the power key on GBM

Signed-off-by: Matthias Reichl <hias@horus.com>
This commit is contained in:
Matthias Reichl 2023-09-24 14:04:00 +02:00
parent 0c3d1cf48a
commit f1b8be5f7f

View File

@ -203,7 +203,11 @@ post_makeinstall_target() {
# tune logind.conf
sed -e "s,^.*HandleLidSwitch=.*$,HandleLidSwitch=ignore,g" -i ${INSTALL}/etc/systemd/logind.conf
sed -e "s,^.*HandlePowerKey=.*$,HandlePowerKey=ignore,g" -i ${INSTALL}/etc/systemd/logind.conf
if [ "${DISPLAYSERVER}" = "no" ]; then
sed -e "s,^.*HandlePowerKey=.*$,HandlePowerKey=poweroff,g" -i ${INSTALL}/etc/systemd/logind.conf
else
sed -e "s,^.*HandlePowerKey=.*$,HandlePowerKey=ignore,g" -i ${INSTALL}/etc/systemd/logind.conf
fi
# replace systemd-machine-id-setup with ours
safe_remove ${INSTALL}/usr/lib/systemd/system/systemd-machine-id-commit.service