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

Side by Side Diff: init

Issue 6626034: Just regular mount (Closed) Base URL: ssh://git@gitrw.chromium.org:9222/initramfs.git@master
Patch Set: Created 9 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 #!/bin/sh -x 1 #!/bin/sh -x
2 2
3 # Copyright (c) 2010 The Chromium OS Authors. All rights reserved. 3 # Copyright (c) 2010 The Chromium OS Authors. All rights reserved.
4 # Use of this source code is governed by a BSD-style license that can be 4 # Use of this source code is governed by a BSD-style license that can be
5 # found in the LICENSE file. 5 # found in the LICENSE file.
6 # 6 #
7 # /init script for use in factory install shim. Requires busybox in 7 # /init script for use in factory install shim. Requires busybox in
8 # /bin/busybox, and a symlink from /bin/sh -> busybox. 8 # /bin/busybox, and a symlink from /bin/sh -> busybox.
9 9
10 # USB card partition and mount point. 10 # USB card partition and mount point.
(...skipping 289 matching lines...) Expand 10 before | Expand all | Expand 10 after
300 log "Copying usb->tmpfs..." 300 log "Copying usb->tmpfs..."
301 (cd "${USB_MNT}" ; tar cf - . | (cd "${NEWROOT_MNT}" && tar xf -)) 301 (cd "${USB_MNT}" ; tar cf - . | (cd "${NEWROOT_MNT}" && tar xf -))
302 RES=$? 302 RES=$?
303 log "Copy returned with result $RES" 303 log "Copy returned with result $RES"
304 return $RES 304 return $RES
305 } 305 }
306 306
307 copy_lsb() { 307 copy_lsb() {
308 STATEFUL_LSB="dev_image/etc/lsb-factory" 308 STATEFUL_LSB="dev_image/etc/lsb-factory"
309 mkdir -p "${NEWROOT_MNT}/mnt/stateful_partition/dev_image/etc" 309 mkdir -p "${NEWROOT_MNT}/mnt/stateful_partition/dev_image/etc"
310 # Mounting ext3 as ext2 since the journal is unneeded in ro. 310 # Mounting ext3 as ext2 since the journal is unneeded in ro.
jglasgow 2011/03/07 17:02:59 This comment is no longer relevant
311 if ! mount -n -o ro -t ext2 "${STATE_DEV}" "${STATEFUL_MNT}"; then 311 if ! mount -n "${STATE_DEV}" "${STATEFUL_MNT}"; then
312 log "Failed to mount ${STATE_DEV}!! Failing." 312 log "Failed to mount ${STATE_DEV}!! Failing."
313 return 1 313 return 1
314 fi 314 fi
315 if [ -f "${STATEFUL_MNT}/${STATEFUL_LSB}" ]; then 315 if [ -f "${STATEFUL_MNT}/${STATEFUL_LSB}" ]; then
316 log "Found ${STATEFUL_MNT}/${STATEFUL_LSB}" 316 log "Found ${STATEFUL_MNT}/${STATEFUL_LSB}"
317 cp -a "${STATEFUL_MNT}/${STATEFUL_LSB}" \ 317 cp -a "${STATEFUL_MNT}/${STATEFUL_LSB}" \
318 "${NEWROOT_MNT}/mnt/stateful_partition/${STATEFUL_LSB}" 318 "${NEWROOT_MNT}/mnt/stateful_partition/${STATEFUL_LSB}"
319 else 319 else
320 log "Failed to find ${STATEFUL_MNT}/${STATEFUL_LSB}!! Failing." 320 log "Failed to find ${STATEFUL_MNT}/${STATEFUL_LSB}!! Failing."
321 umount "$STATEFUL_MNT" 321 umount "$STATEFUL_MNT"
(...skipping 491 matching lines...) Expand 10 before | Expand all | Expand 10 after
813 exit 0 813 exit 0
814 } 814 }
815 815
816 # Make this source-able for testing. 816 # Make this source-able for testing.
817 if [ "$0" = "/init" ]; then 817 if [ "$0" = "/init" ]; then
818 main "$@" 818 main "$@"
819 # Should never reach here. 819 # Should never reach here.
820 exit 1 820 exit 1
821 fi 821 fi
822 822
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698