From 3b44f34de7385e835a167a8e67e235ba99afcba9 Mon Sep 17 00:00:00 2001 From: Chris Sosa Date: Mon, 25 Oct 2010 13:21:42 -0700 Subject: [PATCH] Fix egrep for checking for rw/ro. Right now we're not fixing symlinks because mount_gpt_image thinks it's mounted ro. Change-Id: Ie61536cd8d7bc276831c488e7ab892db14b05a94 BUG=8116 TEST=Mounted image from device and locally with both rw, and ro options. Review URL: http://codereview.chromium.org/4048006 --- mount_gpt_image.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mount_gpt_image.sh b/mount_gpt_image.sh index bb8fd7ec2c..cf623a44ab 100755 --- a/mount_gpt_image.sh +++ b/mount_gpt_image.sh @@ -47,7 +47,7 @@ function unmount_image() { # Don't die on error to force cleanup set +e # Reset symlinks in /usr/local. - if mount | grep "${FLAGS_rootfs_mountpt} (rw,bind)"; then + if mount | egrep ".* ${FLAGS_rootfs_mountpt} .*\(rw,"; then setup_symlinks_on_root "/usr/local" "/var" \ "${FLAGS_stateful_mountpt}" fix_broken_symlinks "${FLAGS_rootfs_mountpt}"