From a069ecafe76710cdc758f5c79a7c000bfe3a7e76 Mon Sep 17 00:00:00 2001 From: Simon Rettberg Date: Mon, 3 Aug 2020 18:04:59 +0200 Subject: [systemd-distro] Get this module into working state, switch --- core/rootfs/rootfs-stage31/data/init | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) (limited to 'core/rootfs/rootfs-stage31/data/init') diff --git a/core/rootfs/rootfs-stage31/data/init b/core/rootfs/rootfs-stage31/data/init index 3f39c66e..00a88667 100755 --- a/core/rootfs/rootfs-stage31/data/init +++ b/core/rootfs/rootfs-stage31/data/init @@ -189,7 +189,10 @@ if [ ! -z "$SLX_DEMO_PASS" ]; then fi # Activate debug shell after switchroot? -[ -n "$DEBUG_SHELL" ] && ln -s "../debug-shell.service" "${FUTURE_ROOT}/usr/lib/systemd/system/sysinit.target.wants/debug-shell.service" +if [ -n "$DEBUG_SHELL" ]; then + mkdir -p "${FUTURE_ROOT}/etc/systemd/system/sysinit.target.wants" + ln -s "../debug-shell.service" "${FUTURE_ROOT}/etc/systemd/system/sysinit.target.wants/debug-shell.service" +fi # Exam mode if [ -n "$SLX_EXAM" ]; then @@ -233,8 +236,11 @@ echo "$bench_result" > "${FUTURE_ROOT}/opt/openslx/.benchmark" unset BOOT_IMAGE initrd KCL ip slxbase slxsrv IPINFO vga ip MAC BOOTIF DEBUG OLDPWD MUTED_OUTPUT GFX unset ip router dns hostname domain search if ntpsrv export HOME=/ -export init="/usr/lib/systemd/systemd" export recovery= export PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/opt/openslx/sbin:/opt/openslx/bin" -exec /sbin/switch_root -c /dev/console /mnt /usr/lib/systemd/systemd $SD_CMDLINE +for init in "/lib/systemd/systemd" "/usr/lib/systemd/systemd"; do + [ -x "${FUTURE_ROOT}/${init}" ] || continue + export init + exec /sbin/switch_root -c /dev/console /mnt "$init" $SD_CMDLINE +done -- cgit v1.2.3-55-g7522