From ab9bdec984d134fe3858cfd966bb09000f967eb5 Mon Sep 17 00:00:00 2001 From: Ken Mixter Date: Fri, 7 May 2010 11:31:52 -0700 Subject: [PATCH] Fix rootfs size writing BUG=3125 Review URL: http://codereview.chromium.org/2016005 --- mod_for_test_scripts/000recordRootFsSize | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/mod_for_test_scripts/000recordRootFsSize b/mod_for_test_scripts/000recordRootFsSize index 7ba224c5a8..3540b82cc4 100755 --- a/mod_for_test_scripts/000recordRootFsSize +++ b/mod_for_test_scripts/000recordRootFsSize @@ -13,7 +13,10 @@ echo "Recording production image size." FILE="${ROOT_FS_DIR}/root/bytes-rootfs-prod" if [[ ! -f "${FILE}" ]]; then # This will complain it cannot find a valid mtab so keep it quiet. - df -B1 -P 2>/dev/null | grep ${ROOT_FS_DIR} | awk '{ print $3 }' > "${FILE}" + # Grep for rootfs mount at end of line otherwise we will get rootfs/var + # mount point as well. + df -B1 -P 2>/dev/null | grep "${ROOT_FS_DIR}$" | awk '{ print $3 }' > \ + "${FILE}" else echo " Not modifying existing ${FILE}." fi