flatcar-scripts/chroot_version_hooks.d/47_path_overrides
Brian Harring f264b82dd2 Force our umount w/in the chroot.
Do this via ensuring that any common.sh invoker
of raw umount (say a root script) sees our umount
path.

Additionally, inject into default profiles our override,
and via an upgrade scriptlet.

This is round two; originally appeared as CL:32088, was
reverted due to:
https://uberchromegw.corp.google.com/i/chromiumos/builders/chromiumos%20sdk/builds/2314/steps/BuildBoard/logs/stdio

The fix however is just adding a single sudo mkdir. :/

BUG=chromium-os:23443
TEST=cros_sdk --replace --bootstrap
TEST=cros_sdk --replace

Change-Id: I0dc7522a9c623f40081d4f138cea0c2c45171fea
Reviewed-on: https://gerrit.chromium.org/gerrit/32365
Commit-Ready: Brian Harring <ferringb@chromium.org>
Tested-by: Brian Harring <ferringb@chromium.org>
Reviewed-by: Chris Sosa <sosa@chromium.org>
2012-09-06 10:34:33 -07:00

14 lines
686 B
Plaintext

# Copyright (c) 2012 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.
# Ensure that crosutils path overrides are in use; note that chroot
# creation also invokes this, thus why we check for CROS_CHROOT; for
# the normal upgrade pathway, it's non existant. For chroot creation,
# It points to the chroot base.
sudo mkdir -p "${CROS_CHROOT}/etc/profile.d/"
echo 'export PATH="/usr/local/path-overrides${PATH:+:${PATH}}"' | \
sudo tee "${CROS_CHROOT}"/etc/profile.d/crosutils-path-overrides.sh \
> /dev/null
sudo chmod 644 "${CROS_CHROOT}"/etc/profile.d/crosutils-path-overrides.sh