Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1182)

Unified Diff: src/scripts/image_to_usb.sh

Issue 1017001: Add installation of stateful partition to scripts (Closed)
Patch Set: Merge changes Created 10 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/platform/installer/chromeos-install ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/scripts/image_to_usb.sh
diff --git a/src/scripts/image_to_usb.sh b/src/scripts/image_to_usb.sh
index 693a50bd5b8657ed2d28ab2b37555e8895e90e70..a771a9a26eb452bfda820cc598bc5d92af092118 100755
--- a/src/scripts/image_to_usb.sh
+++ b/src/scripts/image_to_usb.sh
@@ -134,6 +134,7 @@ function install_autotest {
if [ -d ${AUTOTEST_SRC} ]
then
local stateful_loop_dev=$(sudo losetup -f)
+ local stateful_root="${STATEFUL_DIR}/dev_image"
if [ -z "${stateful_loop_dev}" ]
then
echo "No free loop device. Free up a loop device or reboot. exiting."
@@ -144,15 +145,15 @@ function install_autotest {
echo "Mounting ${STATEFUL_DIR} loopback"
sudo losetup "${stateful_loop_dev}" "${STATEFUL_DIR}.image"
sudo mount "${stateful_loop_dev}" "${STATEFUL_DIR}"
-
+
echo -ne "Install autotest into stateful partition..."
- local autotest_client="/home/autotest-client"
- sudo mkdir -p "${STATEFUL_DIR}${autotest_client}"
+ local autotest_client="/home/autotest-client"
+ sudo mkdir -p "${stateful_root}/${autotest_client}"
sudo cp -fpru ${AUTOTEST_SRC}/client/* \
- "${STATEFUL_DIR}${autotest_client}"
- sudo chmod 755 "${STATEFUL_DIR}${autotest_client}"
- sudo chown -R 1000:1000 "${STATEFUL_DIR}${autotest_client}"
-
+ "${stateful_root}/${autotest_client}"
+ sudo chmod 755 "${stateful_root}/${autotest_client}"
+ sudo chown -R 1000:1000 "${stateful_root}/${autotest_client}"
+
sudo umount ${STATEFUL_DIR}
sudo losetup -d "${stateful_loop_dev}"
trap - INT TERM EXIT
« no previous file with comments | « src/platform/installer/chromeos-install ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698