| Index: src/scripts/mod_image_for_test.sh
|
| diff --git a/src/scripts/mod_image_for_test.sh b/src/scripts/mod_image_for_test.sh
|
| index ef783a98d034bab0e049ba06ee2cf362eb89c2ee..fb35572443736b9bcda4a0f7219c3d1d40e927bb 100755
|
| --- a/src/scripts/mod_image_for_test.sh
|
| +++ b/src/scripts/mod_image_for_test.sh
|
| @@ -50,10 +50,6 @@ cleanup_rootfs_mounts() {
|
| echo "Killing process that has open file on our rootfs: $cmdline"
|
| ! sudo kill $pid # Preceded by ! to disable ERR trap.
|
| 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() {
|
| @@ -100,15 +96,9 @@ else
|
| fi
|
|
|
| MOD_SCRIPTS_ROOT="${GCLIENT_ROOT}/src/scripts/mod_for_test_scripts"
|
| -sudo mkdir -p "${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
|
| -sudo chroot "${ROOT_FS_DIR}" "/modify_scripts/test_setup.sh"
|
| -
|
| -sudo umount "${ROOT_FS_DIR}/modify_scripts"
|
| -sudo rmdir "${ROOT_FS_DIR}/modify_scripts"
|
| +sudo GCLIENT_ROOT=${GCLIENT_ROOT} ROOT_FS_DIR=${ROOT_FS_DIR} \
|
| + "${MOD_SCRIPTS_ROOT}/test_setup.sh"
|
|
|
| cleanup
|
| trap - EXIT
|
|
|