1
0
mirror of https://github.com/lxsang/meta-rpi-diya.git synced 2024-12-26 18:58:20 +01:00

mount /etc to writable partition

This commit is contained in:
DanyLE 2023-07-10 16:08:11 +02:00
parent 0544fa9554
commit 60e28aa4d9
4 changed files with 10 additions and 10 deletions

View File

@ -1 +1,7 @@
hostname = "diya"
do_install:append () {
cat >> ${D}${sysconfdir}/fstab <<EOF
# add bind mount for /etc
/etc /var/etc none defaults,bind 0 0
EOF
}

View File

@ -1,2 +1,2 @@
DROPBEAR_EXTRA_ARGS="-w"
DROPBEAR_RSAKEY_DIR=/var/etc/dropbear
DROPBEAR_RSAKEY_DIR=/etc/dropbear

View File

@ -47,13 +47,7 @@ IMAGE_INSTALL:append = "libcurl \
raspi-gpio \
"
patch_rootfs () {
install -d ${IMAGE_ROOTFS}/var/etc
install -m 0644 ${IMAGE_ROOTFS}/etc/passwd ${IMAGE_ROOTFS}/var/etc/
install -m 0644 ${IMAGE_ROOTFS}/etc/group ${IMAGE_ROOTFS}/var/etc/
rm ${IMAGE_ROOTFS}/etc/passwd
rm ${IMAGE_ROOTFS}/etc/group
ln -sf /var/etc/passwd ${IMAGE_ROOTFS}/etc/passwd
ln -sf /var/etc/group ${IMAGE_ROOTFS}/etc/group
cp -a ${IMAGE_ROOTFS}/etc ${IMAGE_ROOTFS}/var/
}
IMAGE_POSTPROCESS_COMMAND += " patch_rootfs "

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/dropbear /var/etc/dropbear
# l root root 0644 /etc/passwd /var/etc/passwd
# l root root 0644 /etc/group /var/etc/group