summaryrefslogtreecommitdiff
path: root/helpers/lh_bootstrap_cdebootstrap
diff options
context:
space:
mode:
Diffstat (limited to 'helpers/lh_bootstrap_cdebootstrap')
-rwxr-xr-xhelpers/lh_bootstrap_cdebootstrap28
1 files changed, 24 insertions, 4 deletions
diff --git a/helpers/lh_bootstrap_cdebootstrap b/helpers/lh_bootstrap_cdebootstrap
index 5453d02..7aa2ea4 100755
--- a/helpers/lh_bootstrap_cdebootstrap
+++ b/helpers/lh_bootstrap_cdebootstrap
@@ -96,7 +96,12 @@ then
# Restore old cache
if [ -d cache/chroot_bootstrap ]
then
- cp -a cache/chroot_bootstrap/* chroot
+ ${LH_ROOT_COMMAND} cp -a cache/chroot_bootstrap/* chroot
+
+ if [ -n "${LH_ROOT_COMMAND}" ]
+ then
+ ${LH_ROOT_COMMAND} chown -R `whoami`:`whoami` chroot
+ fi
# Creating stage file
Create_stagefile .stage/bootstrap
@@ -111,7 +116,12 @@ then
fi
# Executing cdebootstrap (download-only)
- cdebootstrap ${CDEBOOTSTRAP_OPTIONS} --download-only "${LIVE_DISTRIBUTION}" chroot "${LIVE_MIRROR_BUILD}"
+ ${LH_ROOT_COMMAND} cdebootstrap ${CDEBOOTSTRAP_OPTIONS} --download-only "${LIVE_DISTRIBUTION}" chroot "${LIVE_MIRROR_BUILD}"
+
+ if [ -n "${LH_ROOT_COMMAND}" ]
+ then
+ ${LH_ROOT_COMMAND} chown -R `whoami`:`whoami` chroot
+ fi
# Removing old cache
if [ -d cache/bootstrap ]
@@ -129,7 +139,12 @@ then
fi
# Executing cdebootstrap (regular run)
- cdebootstrap ${CDEBOOTSTRAP_OPTIONS} "${LIVE_DISTRIBUTION}" chroot "${LIVE_MIRROR_BUILD}"
+ ${LH_ROOT_COMMAND} cdebootstrap ${CDEBOOTSTRAP_OPTIONS} "${LIVE_DISTRIBUTION}" chroot "${LIVE_MIRROR_BUILD}"
+
+ if [ -n "${LH_ROOT_COMMAND}" ]
+ then
+ ${LH_ROOT_COMMAND} chown -R `whoami`:`whoami` chroot
+ fi
# Remove cdebootstrap-helper-diverts (needed at least for minimal flavours)
if [ "${LIVE_BOOTSTRAP_FLAVOUR}" = "minimal" ] || [ "${LIVE_BOOTSTRAP_FLAVOUR}" = "mini" ]
@@ -156,7 +171,12 @@ then
rm -rf cache/chroot_bootstrap
fi
- cp -a chroot cache/chroot_bootstrap
+ ${LH_ROOT_COMMAND} cp -a chroot cache/chroot_bootstrap
+
+ if [ -n "${LH_ROOT_COMMAND}" ]
+ then
+ ${LH_ROOT_COMMAND} chown -R `whoami`:`whoami` cache/chroot_bootstrap
+ fi
fi
# Creating stage file