From 65b323fc2abd91946c20e1b76ac91a16f27607a5 Mon Sep 17 00:00:00 2001 From: DanyLE Date: Mon, 10 Jul 2023 15:24:01 +0200 Subject: [PATCH] add patch_rootfs to image process --- .../images/core-image-minimal.bbappend | 2 ++ recipes-diya/diya-overlay/diya-overlay.bb | 30 ------------------- recipes-diya/diya-overlay/files/80_diya | 4 +-- 3 files changed, 4 insertions(+), 32 deletions(-) delete mode 100644 recipes-diya/diya-overlay/diya-overlay.bb diff --git a/recipes-core/images/core-image-minimal.bbappend b/recipes-core/images/core-image-minimal.bbappend index 4f005e9..e0005fb 100644 --- a/recipes-core/images/core-image-minimal.bbappend +++ b/recipes-core/images/core-image-minimal.bbappend @@ -52,6 +52,8 @@ patch_rootfs () { install -m 0644 ${IMAGE_ROOTFS}/etc/group ${IMAGE_ROOTFS}/var/etc/ rm ${IMAGE_ROOTFS}/etc/passwd rm ${IMAGE_ROOTFS}/etc/group + ln -sf ${IMAGE_ROOTFS}/etc/passwd /var/etc/passwd + ln -sf ${IMAGE_ROOTFS}/etc/group /var/etc/group } IMAGE_POSTPROCESS_COMMAND += " patch_rootfs " diff --git a/recipes-diya/diya-overlay/diya-overlay.bb b/recipes-diya/diya-overlay/diya-overlay.bb deleted file mode 100644 index a0940ed..0000000 --- a/recipes-diya/diya-overlay/diya-overlay.bb +++ /dev/null @@ -1,30 +0,0 @@ -DESCRIPTION = "Auto configuration deployment from media" -DEPENDS = "" -LICENSE = "MIT" -LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302" - -SRC_URI += "file://confd \ - file://expandfs.sh \ - file://80_diya \ - file://fs_resize" - - -inherit update-rc.d useradd - -USERADD_PACKAGES = "${PN}" -GROUPADD_PACKAGES = "${PN}" - -USERADD_PARAM:${PN} = "-u 1000 -d /home/diya -r -s /bin/sh diya" - -INITSCRIPT_NAME = "confd" -INITSCRIPT_PARAMS = "start 80 S ." - -do_install() { - install -d ${D}/${sysconfdir}/init.d/ - install -m 0755 ${WORKDIR}/confd ${D}/${sysconfdir}/init.d/confd - install -d ${D}/usr/bin/ - install -d ${D}/etc/default/volatiles - install -m 0644 ${WORKDIR}/80_diya ${D}${sysconfdir}/default/volatiles - install -m 0755 ${WORKDIR}/expandfs.sh ${D}/usr/bin/expandfs.sh - install -m 0755 ${WORKDIR}/fs_resize ${DEPLOY_DIR_IMAGE}/ -} diff --git a/recipes-diya/diya-overlay/files/80_diya b/recipes-diya/diya-overlay/files/80_diya index 23c5921..8f6f562 100644 --- a/recipes-diya/diya-overlay/files/80_diya +++ b/recipes-diya/diya-overlay/files/80_diya @@ -1,5 +1,5 @@ # d root root 0755 /var/etc/dropbear none l root root 0644 /etc/network/interfaces /var/etc/network/itf_diya l root root 0644 /etc/dropbear /var/etc/dropbear -l root root 0644 /etc/passwd /var/etc/passwd -l root root 0644 /etc/group /var/etc/group +# l root root 0644 /etc/passwd /var/etc/passwd +# l root root 0644 /etc/group /var/etc/group