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
This commit is contained in:
parent
1a7fdc62da
commit
476e86a01f
@ -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 \
|
||||
|
19
features.in/live/live/image-scripts.d/50-runapp
Executable file
19
features.in/live/live/image-scripts.d/50-runapp
Executable file
@ -0,0 +1,19 @@
|
||||
#!/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_
|
||||
:
|
Loading…
x
Reference in New Issue
Block a user