mirror of
https://github.com/flatcar/scripts.git
synced 2026-05-04 19:56:32 +02:00
Add hook for personalizing chroot.
This places a simple hook in cros_sdk by executing commands in $HOME/.cros_chroot_init when a chroot is built. This lets users copy files to the chroot (for instance, scripts), as well as add lines to .bash_profile and other rc files. BUG=chromium-os:31295 TEST=tested manually and verified .cros_chroot_init is executed when present Change-Id: I2a5b070a9827272f7bb7b3d340ad6937b0bef329 Reviewed-on: https://gerrit.chromium.org/gerrit/23668 Reviewed-by: Mike Frysinger <vapier@chromium.org> Tested-by: Luigi Semenzato <semenzato@chromium.org> Commit-Ready: Luigi Semenzato <semenzato@chromium.org>
This commit is contained in:
parent
db0a3903d1
commit
2443fdd62e
@ -298,6 +298,10 @@ EOF
|
||||
echo "Copying ~/.gitconfig into chroot"
|
||||
cp $HOME/.gitconfig "$FLAGS_chroot/home/$USER/"
|
||||
fi
|
||||
|
||||
if [[ -f $HOME/.cros_chroot_init ]]; then
|
||||
/bin/bash $HOME/.cros_chroot_init "${FLAGS_chroot}"
|
||||
fi
|
||||
}
|
||||
|
||||
# Handle deleting an existing environment.
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user