From 724b0cbaa04ca6fc8e4cc4c9ab0acaf6b9e09534 Mon Sep 17 00:00:00 2001 From: Anton Midyukov Date: Fri, 6 Nov 2020 01:43:12 +0700 Subject: [PATCH] oem: Added ability to set alterator-setup steps --- features.in/oem/README | 18 ++++++++++++++++++ features.in/oem/config.mk | 1 + .../oem/rootfs/image-scripts.d/99-oem-setup | 8 ++++++++ 3 files changed, 27 insertions(+) diff --git a/features.in/oem/README b/features.in/oem/README index 31978e86..3f589ad7 100644 --- a/features.in/oem/README +++ b/features.in/oem/README @@ -1,2 +1,20 @@ Эта фича обеспечивает автоматический запуск предварительной настройки, характерный для OEM-образов. + +== Переназначение шагов alterator-setup == +Дефолтные шаги определяются в файле /etc/alterator-setup/steps. +Его дефолтное содержание: +sysconfig +notes-license +datetime +root +users +setup-finish + +Для переопределения списка шагов используйте переменную OEM_STEPS. +Пример: +цель: use/oem + @$(call set,OEM_STEPS,sysconfig notes-license datetime setup-finish) + +Список доступных шагов для alterator-setup находится в +/usr/share/alterator/steps/ diff --git a/features.in/oem/config.mk b/features.in/oem/config.mk index 239efe8b..30c55cf5 100644 --- a/features.in/oem/config.mk +++ b/features.in/oem/config.mk @@ -8,6 +8,7 @@ use/oem: use/services use/branding @$(call add,DEFAULT_SERVICES_ENABLE,$$(OEM_TARGET)) @$(call xport,OEM_TARGET) @$(call xport,OEM_NO_CLEANUP) + @$(call xport,OEM_STEPS) use/oem/vnc: use/oem use/x11-vnc use/net-eth/dhcp @$(call add,THE_PACKAGES,alterator-setup-x11vnc) diff --git a/features.in/oem/rootfs/image-scripts.d/99-oem-setup b/features.in/oem/rootfs/image-scripts.d/99-oem-setup index 3487b925..b55785a9 100755 --- a/features.in/oem/rootfs/image-scripts.d/99-oem-setup +++ b/features.in/oem/rootfs/image-scripts.d/99-oem-setup @@ -13,4 +13,12 @@ echo "LANG=en_US.utf-8" >> /etc/sysconfig/i18n [ ! "$GLOBAL_OEM_NO_CLEANUP" = yes ] || sed -i 's/^REMOVE_SELF=.*/REMOVE_SELF=0/' /etc/alterator-setup/config +# Set alterator-setup steps +if [ -n "$GLOBAL_OEM_STEPS" ]; then + rm -f /etc/alterator-setup/steps + for OEM_STEP in $GLOBAL_OEM_STEPS; do + echo $OEM_STEP >> /etc/alterator-setup/steps + done +fi + :