All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andre McCurdy <armccurdy@gmail.com>
To: openembedded-core@lists.openembedded.org
Subject: [PATCH 07/13] rootfs-postcommands.bbclass: add inittab tweak to read_only_rootfs_hook()
Date: Fri, 23 Aug 2019 13:51:38 -0700	[thread overview]
Message-ID: <1566593504-21918-7-git-send-email-armccurdy@gmail.com> (raw)
In-Reply-To: <1566593504-21918-1-git-send-email-armccurdy@gmail.com>

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@gmail.com>
---
 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.
-- 
1.9.1



  parent reply	other threads:[~2019-08-23 20:52 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-08-23 20:51 [PATCH 01/13] bitbake.conf: drop FETCHCMD, GITDIR, etc fetcher over-rides Andre McCurdy
2019-08-23 20:51 ` [PATCH 02/13] tune-arm1136jf-s.inc: add hardfloat support Andre McCurdy
2019-08-23 20:51 ` [PATCH 03/13] tune-arm1176jz-s.inc: add support for arm1176jz-s CPU specific tuning Andre McCurdy
2019-08-24 17:21   ` Khem Raj
2019-08-23 20:51 ` [PATCH 04/13] tune-ep9312.inc: fix TUNEVALID description Andre McCurdy
2019-08-23 20:51 ` [PATCH 05/13] feature-arm-thumb.inc: fix ARM_THUMB_SUFFIX Andre McCurdy
2019-09-04 18:54   ` Andre McCurdy
2019-08-23 20:51 ` [PATCH 06/13] packagegroup-core-boot: drop duplicate MACHINE_ESSENTIAL_EXTRA_RDEPENDS, etc Andre McCurdy
2019-08-23 20:51 ` Andre McCurdy [this message]
2019-08-23 20:51 ` [PATCH 08/13] base-files: nsswitch.conf is glibc specific Andre McCurdy
2019-08-23 20:51 ` [PATCH 09/13] glibc: drop obsolete packaging of glibc libnsl libs Andre McCurdy
2019-08-24 17:00   ` Khem Raj
2019-08-27 13:56   ` Adrian Bunk
2019-08-27 15:55     ` Richard Purdie
2019-08-23 20:51 ` [PATCH 10/13] update-rc.d.bbclass: support VIRTUAL-RUNTIME_init_manager == busybox Andre McCurdy
2019-08-24 16:58   ` Khem Raj
2019-08-23 20:51 ` [PATCH 11/13] dropbear: don't create invalid symlinks if ssh, scp, etc are disabled Andre McCurdy
2019-08-24 16:55   ` Khem Raj
2019-08-23 20:51 ` [PATCH 12/13] sqlite3: make CFLAGS consistent across native, nativesdk and target cases Andre McCurdy
2019-08-24 16:49   ` Khem Raj
2019-08-23 20:51 ` [PATCH 13/13] sqlite3: explicitly set target endian-ness Andre McCurdy

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1566593504-21918-7-git-send-email-armccurdy@gmail.com \
    --to=armccurdy@gmail.com \
    --cc=openembedded-core@lists.openembedded.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.