[oe-commits] [openembedded-core] 16/26: rootfs-postcommands.bbclass: add inittab tweak to read_only_rootfs_hook()

git at git.openembedded.org git at git.openembedded.org
Tue Aug 27 15:57:33 UTC 2019


This is an automated email from the git hooks/post-receive script.

rpurdie pushed a commit to branch master-next
in repository openembedded-core.

commit 6f615b129b72387ffefe94d61dcb80c473bd242a
Author: Andre McCurdy <armccurdy at gmail.com>
AuthorDate: Fri Aug 23 13:51:38 2019 -0700

    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.
    
    Signed-off-by: Andre McCurdy <armccurdy at gmail.com>
    Signed-off-by: Richard Purdie <richard.purdie at linuxfoundation.org>
---
 meta/classes/rootfs-postcommands.bbclass | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/meta/classes/rootfs-postcommands.bbclass b/meta/classes/rootfs-postcommands.bbclass
index 6cec23e..fc33816 100644
--- a/meta/classes/rootfs-postcommands.bbclass
+++ b/meta/classes/rootfs-postcommands.bbclass
@@ -95,6 +95,11 @@ read_only_rootfs_hook () {
 		sed -i -e '/^[#[:space:]]*\/dev\/root/{s/defaults/ro/;s/\([[:space:]]*[[:digit:]]\)\([[:space:]]*\)[[:digit:]]$/\1\20/}' ${IMAGE_ROOTFS}/etc/fstab
 	fi
 
+	# Tweak the "mount -o remount,rw /" command in busybox-inittab inittab
+	if [ -f ${IMAGE_ROOTFS}/etc/inittab ]; then
+		sed -i 's|/bin/mount -o remount,rw /|/bin/mount -o remount,ro /|' ${IMAGE_ROOTFS}/etc/inittab
+	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
 	# and the keys under /var/run/ssh.

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Openembedded-commits mailing list