diff options
author | Simon Rettberg | 2024-11-08 16:32:27 +0100 |
---|---|---|
committer | Simon Rettberg | 2024-11-08 16:32:27 +0100 |
commit | e8e07f0754b259a01e3639f77485d6eea38da9fa (patch) | |
tree | 4bfd63d03ae26e19f5d93eba83bc2a52c59b7ee5 /core | |
parent | [kiosk-chromium] Fix path of chromium preload (add debian variant) (diff) | |
download | mltk-e8e07f0754b259a01e3639f77485d6eea38da9fa.tar.gz mltk-e8e07f0754b259a01e3639f77485d6eea38da9fa.tar.xz mltk-e8e07f0754b259a01e3639f77485d6eea38da9fa.zip |
[kiosk-common] Clarify behavior of kiosk-setup service
Diffstat (limited to 'core')
-rw-r--r-- | core/modules/kiosk-common/data/etc/systemd/system/kiosk.service | 3 | ||||
-rwxr-xr-x | core/modules/kiosk-common/data/opt/openslx/scripts/systemd-setup_kiosk | 16 |
2 files changed, 18 insertions, 1 deletions
diff --git a/core/modules/kiosk-common/data/etc/systemd/system/kiosk.service b/core/modules/kiosk-common/data/etc/systemd/system/kiosk.service index dba49864..1c6c242d 100644 --- a/core/modules/kiosk-common/data/etc/systemd/system/kiosk.service +++ b/core/modules/kiosk-common/data/etc/systemd/system/kiosk.service @@ -3,6 +3,7 @@ Description=Prepare KIOSK mode Before=display-manager.service kdm.service lightdm.service [Service] +Type=forking ExecStart=/opt/openslx/scripts/systemd-setup_kiosk RemainAfterExit=true - +Restart=no diff --git a/core/modules/kiosk-common/data/opt/openslx/scripts/systemd-setup_kiosk b/core/modules/kiosk-common/data/opt/openslx/scripts/systemd-setup_kiosk index 40d39a6c..6b4132ae 100755 --- a/core/modules/kiosk-common/data/opt/openslx/scripts/systemd-setup_kiosk +++ b/core/modules/kiosk-common/data/opt/openslx/scripts/systemd-setup_kiosk @@ -1,8 +1,24 @@ #!/bin/bash +# This is launched as a systemd service of default type forking, +# *NOT* oneshot. This is so that you can have blocking tasks in +# the sourced files, that will delay this service from being +# considered started up completely, so that any services that +# are ordered *After* this one will actually wait until everything +# is finished and we reach the final "exit 0". +# If you want to execute some longer-running task that doesn't need +# to finish before lightdm or any browser starts up (e.g. prefetch), +# you can just fork it into the background, and it will keep +# running while services ordered after this one will already get +# executed. + for file in "$0".d/*; do [ -f "$file" ] || continue # hooks for browser-related stuff + if ! bash -n "$file"; then + slxlog "kiosk-setup-syntax" "Syntax error in kiosk setup script '$file'" + continue + fi . "$file" || slxlog "kiosk-setup" "Failed to source '$file'." done |