From 8a4a50fdb6b206fbff62fd3043ed388f25a0ffb1 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sun, 23 Sep 2007 10:04:51 +0200 Subject: Adding live-helper 1.0~a7-1. --- helpers/lh_binary_chroot | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) (limited to 'helpers/lh_binary_chroot') 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 -- cgit v1.2.3