Index: src/scripts/mod_for_test_scripts/000recordRootFsSize |
diff --git a/src/scripts/mod_for_test_scripts/000recordRootFsSize b/src/scripts/mod_for_test_scripts/000recordRootFsSize |
new file mode 100755 |
index 0000000000000000000000000000000000000000..e926695a669c92a14f14de8f9a728dc98520aa32 |
--- /dev/null |
+++ b/src/scripts/mod_for_test_scripts/000recordRootFsSize |
@@ -0,0 +1,19 @@ |
+#!/bin/bash |
+ |
+# Copyright (c) 2009 The Chromium OS Authors. All rights reserved. |
+# Use of this source code is governed by a BSD-style license that can be |
+# found in the LICENSE file. |
+# |
+# Record the original size of the image without modifications from |
+# mod_image_for_test.sh, for reporting and monitoring through autotest. |
+ |
+# Record the size, but don't overwrite the file as its existence indicates |
+# that this image is not a production image. |
+echo "Recording production image size." |
+FILE="/root/bytes-rootfs-prod" |
sosa
2010/01/14 03:30:46
Can't you just put this under /var/log/metrics? I
kmixter1
2010/01/14 23:07:48
The stateful partition isn't created as part of ro
|
+if [[ ! -f "${FILE}" ]]; then |
+ # This will complain it cannot find a valid mtab so keep it quiet. |
+ df -B1 / 2>/dev/null | tail -1 | awk '{ print $3 }' > "${FILE}" |
+else |
+ echo " Not modifying existing ${FILE}." |
+fi |