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

Unified Diff: src/scripts/prep_usb.sh

Issue 1648018: New helper script to mount (and umount) gpt image into image_dir/rootfs and mount /var, /usr/local (Closed)
Patch Set: nit Created 10 years, 8 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/scripts/mount_gpt_image.sh ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/scripts/prep_usb.sh
diff --git a/src/scripts/prep_usb.sh b/src/scripts/prep_usb.sh
deleted file mode 100755
index ba5f3d81e7f40ecbec9056c0dafe58f2a19280f2..0000000000000000000000000000000000000000
--- a/src/scripts/prep_usb.sh
+++ /dev/null
@@ -1,37 +0,0 @@
-#!/bin/bash
-
-# Copyright (c) 2010 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.
-
-# Load common constants. This should be the first executable line.
-# The path to common.sh should be relative to your script's location.
-. "$(dirname "$0")/common.sh"
-
-DEFINE_boolean "unmount" $FLAGS_FALSE "unmount USB partitions" "u"
-DEFINE_string "device" "/dev/sdc" \
- "The device on which the mountable partitions live." "d"
-DEFINE_string "rootfs_mountpt" "/tmp/m" "Mount point for rootfs" "r"
-DEFINE_string "stateful_mountpt" "/tmp/s" \
- "Mount point for stateful partition" "s"
-
-# Parse command line.
-FLAGS "$@" || exit 1
-eval set -- "${FLAGS_ARGV}"
-
-mkdir -p "${FLAGS_rootfs_mountpt}"
-mkdir -p "${FLAGS_stateful_mountpt}"
-
-if [[ $FLAGS_unmount -eq $FLAGS_FALSE ]]; then
- sudo mount "${FLAGS_device}3" "${FLAGS_rootfs_mountpt}"
- sudo mount "${FLAGS_device}1" "${FLAGS_stateful_mountpt}"
- sudo mount --bind "${FLAGS_stateful_mountpt}/var" \
- "${FLAGS_rootfs_mountpt}/var"
- echo "RootFS of bootable medium mounted at ${FLAGS_rootfs_mountpt}."
-else
- echo "Attempting to unmount ${FLAGS_stateful_mountpt} " \
- "and ${FLAGS_rootfs_mountpt}"
- sudo umount "${FLAGS_rootfs_mountpt}/var"
- sudo umount "${FLAGS_stateful_mountpt}"
- sudo umount "${FLAGS_rootfs_mountpt}"
-fi
« no previous file with comments | « src/scripts/mount_gpt_image.sh ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698