mirror of
https://git.yoctoproject.org/poky
synced 2026-04-21 03:32:12 +02:00
rootfs-postcommands.bbclass: Check if "/etc/fstab" exists
Using "read-only-rootfs" feature in minimal or special
purpose images (eg mounted images) makes build to fail
because ${IMAGE_ROOTFS}/etc/fstab file does not exist.
(From OE-Core rev: 43714514fb29a40830e6619552980d7f88d77fb7)
Signed-off-by: Panagiotis Tamtamis <panagiotis.tamtamis@unify.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
committed by
Richard Purdie
parent
be0bac2125
commit
6830a969f2
@@ -84,7 +84,9 @@ systemd_create_users () {
|
||||
#
|
||||
read_only_rootfs_hook () {
|
||||
# Tweak the mount option and fs_passno for rootfs in fstab
|
||||
sed -i -e '/^[#[:space:]]*\/dev\/root/{s/defaults/ro/;s/\([[:space:]]*[[:digit:]]\)\([[:space:]]*\)[[:digit:]]$/\1\20/}' ${IMAGE_ROOTFS}/etc/fstab
|
||||
if [ -f ${IMAGE_ROOTFS}/etc/fstab ]; then
|
||||
sed -i -e '/^[#[:space:]]*\/dev\/root/{s/defaults/ro/;s/\([[:space:]]*[[:digit:]]\)\([[:space:]]*\)[[:digit:]]$/\1\20/}' ${IMAGE_ROOTFS}/etc/fstab
|
||||
fi
|
||||
|
||||
# If we're using openssh and the /etc/ssh directory has no pre-generated keys,
|
||||
# we should configure openssh to use the configuration file /etc/ssh/sshd_config_readonly
|
||||
|
||||
Reference in New Issue
Block a user