1
0
mirror of https://github.com/lxsang/meta-rpi-diya.git synced 2024-11-08 06:28:23 +01:00

add patch_rootfs to image process

This commit is contained in:
DanyLE 2023-07-10 15:24:01 +02:00
parent f22dde3642
commit 65b323fc2a
3 changed files with 4 additions and 32 deletions

View File

@ -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 "

View File

@ -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}/
}

View File

@ -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