cros_make_image_bootable is not compatible with restart_inside_chroot

restart_inside_chroot first assumes that the calling script is in
src/scripts.  Next any paths are not converted when passed so if
someone passes the most recent image, this will also not be interpreted
correctly.

Change-Id: Icb2dfc661eb84e134b4d8c5cf0354a6c1ab161f0

BUG=
TEST=Manually tested running outside chroot (getting error) and inside chroot.

Review URL: http://codereview.chromium.org/3421025
This commit is contained in:
Chris Sosa 2010-09-21 17:45:15 -07:00
parent cc09f84b5e
commit e8c3cdc91c

View File

@ -14,8 +14,12 @@ if [ ! -r "${COMMON_PATH}" ]; then
echo "ERROR! Cannot find common.sh: ${COMMON_PATH}" 1>&2
exit 1
fi
. "$(dirname "$0")/../common.sh"
# Script must be run inside the chroot.
assert_inside_chroot
set -e
. "$(dirname "$0")/../chromeos-common.sh" # for partoffset and partsize
@ -46,8 +50,6 @@ if [ ! -r "${IMAGE}" ]; then
die "${IMAGE} cannot be read!"
fi
# Script must be run inside the chroot.
restart_in_chroot_if_needed $*
locate_gpt
set +e