diff options
author | Daniel Baumann <daniel@debian.org> | 2007-09-23 10:04:51 +0200 |
---|---|---|
committer | Daniel Baumann <daniel@debian.org> | 2011-03-09 18:18:29 +0100 |
commit | 8a4a50fdb6b206fbff62fd3043ed388f25a0ffb1 (patch) | |
tree | 621dc56a00a65ab0eb1fd4e7d42ad4e45d718741 /helpers/lh_binary_chroot | |
parent | 4739146fc6c4de8b16418517bb882312c475195c (diff) | |
download | vyos-live-build-8a4a50fdb6b206fbff62fd3043ed388f25a0ffb1.tar.gz vyos-live-build-8a4a50fdb6b206fbff62fd3043ed388f25a0ffb1.zip |
Adding live-helper 1.0~a7-1.
Diffstat (limited to 'helpers/lh_binary_chroot')
-rwxr-xr-x | helpers/lh_binary_chroot | 19 |
1 files changed, 12 insertions, 7 deletions
diff --git a/helpers/lh_binary_chroot b/helpers/lh_binary_chroot index 24ee5f88f..58835ad07 100755 --- a/helpers/lh_binary_chroot +++ b/helpers/lh_binary_chroot @@ -45,25 +45,30 @@ Check_lockfile .lock # Creating lock file Create_lockfile .lock -# Normally, proc is not mounted here, but people tend to be lazy +# Normally, virtual filesystems are not mounted here, but people tend to be lazy if [ -f chroot/proc/version ] then - umount chroot/proc + ${LH_ROOT_COMMAND} umount chroot/proc fi if [ -d chroot/sys/kernel ] then - umount chroot/sys + ${LH_ROOT_COMMAND} umount chroot/sys fi # Removing old chroot -rm -rf chroot/chroot -rm -rf chroot.tmp +${LH_ROOT_COMMAND} rm -rf chroot/chroot +${LH_ROOT_COMMAND} rm -rf chroot.tmp # Copying new chroot Echo_message "Copying chroot, this can take a while." -cp -a chroot chroot.tmp -mv chroot.tmp chroot/chroot +${LH_ROOT_COMMAND} cp -a chroot chroot.tmp +${LH_ROOT_COMMAND} mv chroot.tmp chroot/chroot + +if [ -n "${LH_ROOT_COMMAND}" ] +then + ${LH_ROOT_COMMAND} chown -R `whoami`:`whoami` chroot +fi # Creating stage file Create_stagefile .stage/binary_chroot |