mirror of
https://github.com/flatcar/scripts.git
synced 2026-02-26 18:11:45 +01:00
Fix rootfs size writing
BUG=3125 Review URL: http://codereview.chromium.org/2016005
This commit is contained in:
parent
8a970bcd00
commit
ab9bdec984
@ -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
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user