summaryrefslogtreecommitdiffstats
path: root/meta/classes/rootfs-postcommands.bbclass
diff options
context:
space:
mode:
authorAndre McCurdy <armccurdy@gmail.com>2019-08-23 13:51:38 -0700
committerRichard Purdie <richard.purdie@linuxfoundation.org>2019-08-28 11:31:22 +0100
commitba6898d1b2e9b037f02a2cf17298e754aa4968ef (patch)
tree20f30abda023ca4f0b929ea731e380dc461fd29b /meta/classes/rootfs-postcommands.bbclass
parentcfbd8247a69215ce61f50b3253e1cb7e705cdaaf (diff)
downloadpoky-ba6898d1b2e9b037f02a2cf17298e754aa4968ef.tar.gz
rootfs-postcommands.bbclass: add inittab tweak to read_only_rootfs_hook()
It's not clear that we actually need to call mount -o remount,XX from the busybox-inittab inittab at all, but as we currently do, let's respect read-only-rootfs in IMAGE_FEATURES and not remount / as rw. (From OE-Core rev: 8840a831d47a94f36bb2e173164dbaf9b955e809) Signed-off-by: Andre McCurdy <armccurdy@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes/rootfs-postcommands.bbclass')
-rw-r--r--meta/classes/rootfs-postcommands.bbclass5
1 files changed, 5 insertions, 0 deletions
diff --git a/meta/classes/rootfs-postcommands.bbclass b/meta/classes/rootfs-postcommands.bbclass
index 6cec23ef1a..fc338161c4 100644
--- a/meta/classes/rootfs-postcommands.bbclass
+++ b/meta/classes/rootfs-postcommands.bbclass
@@ -95,6 +95,11 @@ read_only_rootfs_hook () {
95 sed -i -e '/^[#[:space:]]*\/dev\/root/{s/defaults/ro/;s/\([[:space:]]*[[:digit:]]\)\([[:space:]]*\)[[:digit:]]$/\1\20/}' ${IMAGE_ROOTFS}/etc/fstab 95 sed -i -e '/^[#[:space:]]*\/dev\/root/{s/defaults/ro/;s/\([[:space:]]*[[:digit:]]\)\([[:space:]]*\)[[:digit:]]$/\1\20/}' ${IMAGE_ROOTFS}/etc/fstab
96 fi 96 fi
97 97
98 # Tweak the "mount -o remount,rw /" command in busybox-inittab inittab
99 if [ -f ${IMAGE_ROOTFS}/etc/inittab ]; then
100 sed -i 's|/bin/mount -o remount,rw /|/bin/mount -o remount,ro /|' ${IMAGE_ROOTFS}/etc/inittab
101 fi
102
98 # If we're using openssh and the /etc/ssh directory has no pre-generated keys, 103 # If we're using openssh and the /etc/ssh directory has no pre-generated keys,
99 # we should configure openssh to use the configuration file /etc/ssh/sshd_config_readonly 104 # we should configure openssh to use the configuration file /etc/ssh/sshd_config_readonly
100 # and the keys under /var/run/ssh. 105 # and the keys under /var/run/ssh.