From de319e1292acd0bd33fc57476b03661995c76c48 Mon Sep 17 00:00:00 2001 From: DanyLE Date: Tue, 1 Aug 2023 19:34:18 +0200 Subject: [PATCH] use sysvinit --- recipes-core/images/core-image-recovery.bb | 4 ++-- recipes-diya/initramfs/recovery-boot_0.1.bb | 7 +++++++ 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/recipes-core/images/core-image-recovery.bb b/recipes-core/images/core-image-recovery.bb index 1f47497..1a3ed47 100644 --- a/recipes-core/images/core-image-recovery.bb +++ b/recipes-core/images/core-image-recovery.bb @@ -32,6 +32,6 @@ cat << 'EOF' >> "${IMAGE_ROOTFS}/etc/hostname" diyaid EOF # enable autologin - sed -i 's/options="/&--autologin root /' \ - "${IMAGE_ROOTFS}${base_bindir}/start_getty" + sed -i 's/getty/getty --autologin root/g' \ + "${IMAGE_ROOTFS}/etc/inittab" } \ No newline at end of file diff --git a/recipes-diya/initramfs/recovery-boot_0.1.bb b/recipes-diya/initramfs/recovery-boot_0.1.bb index ea03379..e585e97 100644 --- a/recipes-diya/initramfs/recovery-boot_0.1.bb +++ b/recipes-diya/initramfs/recovery-boot_0.1.bb @@ -8,6 +8,8 @@ FILESEXTRAPATHS:prepend := "${THISDIR}/files:" PR = "r4" +inherit useradd + inherit allarch SRC_URI = "file://init \ @@ -17,6 +19,11 @@ SRC_URI = "file://init \ S = "${WORKDIR}" +USERADD_PACKAGES = "${PN}" +GROUPADD_PACKAGES = "${PN}" + +USERADD_PARAM:${PN} = "-u 0 -d /root -r -s /bin/sh root" + do_install() { install -d ${D}/init.d