mirror of
https://github.com/flatcar/scripts.git
synced 2025-09-23 14:41:31 +02:00
Fix problem with mod_image_for_test leaving dangling chroot ref
Review URL: http://codereview.chromium.org/661061
This commit is contained in:
parent
213f8958aa
commit
89ae722a21
@ -1,9 +0,0 @@
|
|||||||
# 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.
|
|
||||||
#
|
|
||||||
# Modifies upstart for login manager to use new login manager
|
|
||||||
|
|
||||||
sed -i 's?^#exec /sbin/session_manager_setup.sh?exec /sbin/session_manager_setup.sh?' /etc/init/ui.conf 2> /dev/null
|
|
||||||
sed -i 's?^expect fork?#expect fork?' /etc/init/ui.conf 2> /dev/null
|
|
||||||
sed -i 's?^exec /usr/bin/slim -d?#exec /usr/bin/slim -d?' /etc/init/ui.conf 2> /dev/null
|
|
@ -50,6 +50,10 @@ cleanup_rootfs_mounts() {
|
|||||||
echo "Killing process that has open file on our rootfs: $cmdline"
|
echo "Killing process that has open file on our rootfs: $cmdline"
|
||||||
! sudo kill $pid # Preceded by ! to disable ERR trap.
|
! sudo kill $pid # Preceded by ! to disable ERR trap.
|
||||||
done
|
done
|
||||||
|
if [[ -d "${ROOT_FS_DIR}/modify_scripts" ]]; then
|
||||||
|
echo "Cleaned up modify_scripts mount"
|
||||||
|
! sudo umount "${ROOT_FS_DIR}/modify_scripts"
|
||||||
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
cleanup_rootfs_loop() {
|
cleanup_rootfs_loop() {
|
||||||
@ -97,6 +101,7 @@ fi
|
|||||||
|
|
||||||
MOD_SCRIPTS_ROOT="${GCLIENT_ROOT}/src/scripts/mod_for_test_scripts"
|
MOD_SCRIPTS_ROOT="${GCLIENT_ROOT}/src/scripts/mod_for_test_scripts"
|
||||||
sudo mkdir -p "${ROOT_FS_DIR}/modify_scripts"
|
sudo mkdir -p "${ROOT_FS_DIR}/modify_scripts"
|
||||||
|
|
||||||
sudo mount --bind "${MOD_SCRIPTS_ROOT}" "${ROOT_FS_DIR}/modify_scripts"
|
sudo mount --bind "${MOD_SCRIPTS_ROOT}" "${ROOT_FS_DIR}/modify_scripts"
|
||||||
|
|
||||||
# Run test setup script inside chroot jail to modify the image
|
# Run test setup script inside chroot jail to modify the image
|
||||||
|
Loading…
x
Reference in New Issue
Block a user