Patchwork initscripts: Improve parsing of mount parameters in order to fix remounting of rw jffs2.

login
register
mail settings
Submitter Florian Boor
Date May 3, 2011, 4:04 p.m.
Message ID <1304438673-11897-1-git-send-email-florian.boor@kernelconcepts.de>
Download mbox | patch
Permalink /patch/3113/
State New, archived
Headers show

Comments

Florian Boor - May 3, 2011, 4:04 p.m.
From: Florian Boor <florian@kernelconcepts.de>

This change filters additional mount parameters which can cause jffs2 filesystems to
get remounted even if mounted rw already.

Signed-off-by: Florian Boor <florian.boor@kernelconcepts.de>
---
 recipes/initscripts/initscripts-1.0/checkroot |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

Patch

diff --git a/recipes/initscripts/initscripts-1.0/checkroot b/recipes/initscripts/initscripts-1.0/checkroot
index 7ad00d0..576f051 100755
--- a/recipes/initscripts/initscripts-1.0/checkroot
+++ b/recipes/initscripts/initscripts-1.0/checkroot
@@ -186,7 +186,7 @@  ROOTFSDEV="/dev/root"
 if ! grep -q "^$ROOTFSDEV\>" /proc/mounts; then
   ROOTFSDEV="rootfs"
 fi
-if [ x$(grep "^$ROOTFSDEV\>" /proc/mounts | awk '{print $4}') = "x$rootmode" ]; then
+if [ x$(grep "^$ROOTFSDEV\>" /proc/mounts | awk '{print $4}' | awk -F, '{print $1}') = "x$rootmode" ]; then
 	echo "Root filesystem already $rootmode, not remounting"
 	exit 0
 fi