From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on sa.local.altlinux.org X-Spam-Level: X-Spam-Status: No, score=-1.1 required=5.0 tests=BAYES_00,RDNS_NONE autolearn=no autolearn_force=no version=3.4.1 From: Michael Shigorin To: devel-distro@lists.altlinux.org Date: Sun, 11 Sep 2022 20:33:58 +0300 Message-Id: <20220911173359.32561-2-mike@altlinux.org> X-Mailer: git-send-email 2.25.4 In-Reply-To: <20220911173359.32561-1-mike@altlinux.org> References: <20220911173359.32561-1-mike@altlinux.org> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Subject: [devel-distro] [PATCH 1/2] live: add use/live/runapp X-BeenThere: devel-distro@lists.altlinux.org X-Mailman-Version: 2.1.12 Precedence: list Reply-To: Distributions development List-Id: Distributions development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 11 Sep 2022 17:34:12 -0000 Archived-At: List-Archive: 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. --- features.in/live/README | 5 +++++ features.in/live/config.mk | 5 +++++ features.in/live/live/image-scripts.d/50-runapp | 16 ++++++++++++++++ 3 files changed, 26 insertions(+) create mode 100755 features.in/live/live/image-scripts.d/50-runapp diff --git a/features.in/live/README b/features.in/live/README index 72975f5c9..58302a182 100644 --- a/features.in/live/README +++ b/features.in/live/README @@ -19,3 +19,8 @@ ** перечисляет префиксы каталогов драйвров ядра для удаления ** значение: пусто (по умолчанию) или список через пробел ** см. config.mk + +* LIVE_RUNAPP_BINARY +** указывает имя программы для запуска в режиме киоска +** значение: пусто (по умолчанию) или путь (из $PATH или полный) +** см. тж. пакеты livecd-0ad, livecd-fgfs и сам livecd-runapp diff --git a/features.in/live/config.mk b/features.in/live/config.mk index e6d762285..59e65b9eb 100644 --- a/features.in/live/config.mk +++ b/features.in/live/config.mk @@ -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 \ diff --git a/features.in/live/live/image-scripts.d/50-runapp b/features.in/live/live/image-scripts.d/50-runapp new file mode 100755 index 000000000..3da410108 --- /dev/null +++ b/features.in/live/live/image-scripts.d/50-runapp @@ -0,0 +1,16 @@ +#!/bin/sh -efu +# see also live-0ad + +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_ +: -- 2.33.3