From 79775b365c9fde2ca527a3cb2afe2e25e7fc7395 Mon Sep 17 00:00:00 2001 From: Anton Midyukov Date: Thu, 26 Oct 2023 01:06:08 +0700 Subject: [PATCH] oem: add systemd.unit=setup.target to kernel cmdline If alterator-setup >= 4.0 it only runs when it detects 'systemd.unit=setup.target' in /proc/cmdline. If alterator-setup version <= 4.0 there will be a problem in the form of the remaining argument 'systemd.unit=setup.target' in /proc/cmdline. --- features.in/oem/config.mk | 2 +- features.in/oem/rootfs/image-scripts.d/99-oem-setup | 11 ----------- 2 files changed, 1 insertion(+), 12 deletions(-) diff --git a/features.in/oem/config.mk b/features.in/oem/config.mk index 5d79118d..48a5db8d 100644 --- a/features.in/oem/config.mk +++ b/features.in/oem/config.mk @@ -5,7 +5,7 @@ use/oem: use/services use/branding use/deflogin/root use/l10n @$(call add,BASE_PACKAGES,rootfs-installer-features) @$(call add,PINNED_PACKAGES,rootfs-installer-features) @$(call add,THE_BRANDING,alterator notes) - @$(call try,OEM_TARGET,setup) + @$(call add,BASE_BOOTARGS,systemd.unit=setup.target) @$(call add,DEFAULT_SERVICES_ENABLE,$$(OEM_TARGET)) @$(call xport,OEM_TARGET) @$(call xport,OEM_NO_CLEANUP) 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 7afae999..3a79f147 100755 --- a/features.in/oem/rootfs/image-scripts.d/99-oem-setup +++ b/features.in/oem/rootfs/image-scripts.d/99-oem-setup @@ -1,15 +1,4 @@ #!/bin/sh -# this breaks the default configuration on intent -# so that alterator-setup can run predictably - -TARGET=/lib/systemd/system/$GLOBAL_OEM_TARGET.target - -if [ -s "$TARGET" ]; then - [ -s /etc/systemd/system/default.target ] && - mv /etc/systemd/system/default.target{,.bak} || - rm -f /etc/systemd/system/default.target - ln -s "$TARGET" /etc/systemd/system/default.target -fi # Disable cleanup alterator-setup [ ! "$GLOBAL_OEM_NO_CLEANUP" = yes ] ||