From 3f4bb55187b475d98e661a01197552674f0fd1fb Mon Sep 17 00:00:00 2001 From: Jeffrey Townsend Date: Thu, 13 Jun 2019 16:15:43 +0000 Subject: [PATCH] [Issue 546] Enable boot.d when running systemd init. This change separates the overlays for sysvinit and systemd builds. - The inittab is overlayed if using sysvinit. - /sbin/init is replaced by a script which calls the boot.d sequence and then execs /lib/systemd/systemd when using systemd. --- builds/any/rootfs/stretch/standard/standard.yml | 1 + builds/any/rootfs/stretch/systemd/overlay/sbin/init | 4 ++++ .../rootfs/stretch/{common => sysvinit}/overlay/etc/inittab | 0 3 files changed, 5 insertions(+) create mode 100755 builds/any/rootfs/stretch/systemd/overlay/sbin/init rename builds/any/rootfs/stretch/{common => sysvinit}/overlay/etc/inittab (100%) diff --git a/builds/any/rootfs/stretch/standard/standard.yml b/builds/any/rootfs/stretch/standard/standard.yml index 6b729e7b..ca234abe 100644 --- a/builds/any/rootfs/stretch/standard/standard.yml +++ b/builds/any/rootfs/stretch/standard/standard.yml @@ -66,6 +66,7 @@ Multistrap: Configure: overlays: - ${ONL}/builds/any/rootfs/${ONL_DEBIAN_SUITE}/common/overlay + - ${ONL}/builds/any/rootfs/${ONL_DEBIAN_SUITE}/${INIT}/overlay update-rc.d: - 'faultd defaults' diff --git a/builds/any/rootfs/stretch/systemd/overlay/sbin/init b/builds/any/rootfs/stretch/systemd/overlay/sbin/init new file mode 100755 index 00000000..8f977bd8 --- /dev/null +++ b/builds/any/rootfs/stretch/systemd/overlay/sbin/init @@ -0,0 +1,4 @@ +#!/bin/bash +/etc/boot.d/boot +echo "Starting systemd..." +exec /lib/systemd/systemd diff --git a/builds/any/rootfs/stretch/common/overlay/etc/inittab b/builds/any/rootfs/stretch/sysvinit/overlay/etc/inittab similarity index 100% rename from builds/any/rootfs/stretch/common/overlay/etc/inittab rename to builds/any/rootfs/stretch/sysvinit/overlay/etc/inittab