mirror of
https://github.com/lxsang/meta-rpi-diya.git
synced 2024-12-27 11:08:21 +01:00
mount /etc to writable partition
This commit is contained in:
parent
0544fa9554
commit
60e28aa4d9
@ -1 +1,7 @@
|
|||||||
hostname = "diya"
|
hostname = "diya"
|
||||||
|
do_install:append () {
|
||||||
|
cat >> ${D}${sysconfdir}/fstab <<EOF
|
||||||
|
# add bind mount for /etc
|
||||||
|
/etc /var/etc none defaults,bind 0 0
|
||||||
|
EOF
|
||||||
|
}
|
@ -1,2 +1,2 @@
|
|||||||
DROPBEAR_EXTRA_ARGS="-w"
|
DROPBEAR_EXTRA_ARGS="-w"
|
||||||
DROPBEAR_RSAKEY_DIR=/var/etc/dropbear
|
DROPBEAR_RSAKEY_DIR=/etc/dropbear
|
@ -47,13 +47,7 @@ IMAGE_INSTALL:append = "libcurl \
|
|||||||
raspi-gpio \
|
raspi-gpio \
|
||||||
"
|
"
|
||||||
patch_rootfs () {
|
patch_rootfs () {
|
||||||
install -d ${IMAGE_ROOTFS}/var/etc
|
cp -a ${IMAGE_ROOTFS}/etc ${IMAGE_ROOTFS}/var/
|
||||||
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
|
|
||||||
}
|
}
|
||||||
|
|
||||||
IMAGE_POSTPROCESS_COMMAND += " patch_rootfs "
|
IMAGE_POSTPROCESS_COMMAND += " patch_rootfs "
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
# d root root 0755 /var/etc/dropbear none
|
# 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/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/passwd /var/etc/passwd
|
||||||
# l root root 0644 /etc/group /var/etc/group
|
# l root root 0644 /etc/group /var/etc/group
|
||||||
|
Loading…
Reference in New Issue
Block a user