diff options
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 24ee5f8..58835ad 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 |