Commit 476e86a0 authored by Michael Shigorin's avatar Michael Shigorin Committed by Anton Midyukov

live: add use/live/runapp

Add the possibility to directly configure the desktop app for livecd kiosk mode to start. This should have been done as soon as livecd-runapp hit the streets -- livecd-{0ad,fgfs} definitely must go as adding a line into config is trivially done near the only place that requires them (conf.d/live.mk). TODO: might be more generally useful for vm/* too, take this out into a separate feature then. Edited: https://lists.altlinux.org/pipermail/devel-distro/2022-September/002889.html
parent 1a7fdc62
......@@ -19,3 +19,8 @@
** перечисляет префиксы каталогов драйвров ядра для удаления
** значение: пусто (по умолчанию) или список через пробел
** см. config.mk
* LIVE_RUNAPP_BINARY
** указывает имя программы для запуска в режиме киоска
** значение: пусто (по умолчанию) или путь (из $PATH или полный)
** см. тж. пакеты livecd-0ad, livecd-fgfs и сам livecd-runapp
......@@ -99,6 +99,11 @@ else
use/live/suspend: use/live; @:
endif
# for kiosks
use/live/runapp: use/live;
@$(call add,LIVE_PACKAGES,livecd-runapp)
@$(call xport,LIVE_RUNAPP_BINARY)
# deny network/local drive access for security reasons
use/live/privacy: use/services use/memclean use/deflogin \
use/stage2/ata use/stage2/drm use/stage2/hid \
......
#!/bin/sh -efux
# see also live-0ad
rpm -q livecd-runapp || exit 0
[ -n "${GLOBAL_LIVE_RUNAPP_BINARY:-}" ] || exit 0
CONFIG=/etc/sysconfig/livecd-runapp
if [ -s "$CONFIG" ]; then
echo "$CONFIG exists, not overriding (from $(rpm -qf "$CONFIG"))"
exit 0
fi
mkdir -p "$(dirname "$CONFIG")"
cat >> "$CONFIG" << _EOF_
# mkimage-profiles live 50-runapp hook
BINARY=$GLOBAL_LIVE_RUNAPP_BINARY
_EOF_
:
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment