summaryrefslogtreecommitdiff
path: root/helpers/lh_bootstrap_debootstrap
diff options
context:
space:
mode:
authorDaniel Baumann <daniel@debian.org>2007-09-23 10:04:51 +0200
committerDaniel Baumann <daniel@debian.org>2011-03-09 18:18:29 +0100
commit8a4a50fdb6b206fbff62fd3043ed388f25a0ffb1 (patch)
tree621dc56a00a65ab0eb1fd4e7d42ad4e45d718741 /helpers/lh_bootstrap_debootstrap
parent4739146fc6c4de8b16418517bb882312c475195c (diff)
downloadlive-build-8a4a50fdb6b206fbff62fd3043ed388f25a0ffb1.zip
live-build-8a4a50fdb6b206fbff62fd3043ed388f25a0ffb1.tar.gz
Adding live-helper 1.0~a7-1.
Diffstat (limited to 'helpers/lh_bootstrap_debootstrap')
-rwxr-xr-xhelpers/lh_bootstrap_debootstrap28
1 files changed, 24 insertions, 4 deletions
diff --git a/helpers/lh_bootstrap_debootstrap b/helpers/lh_bootstrap_debootstrap
index d7b807f..43fdd96 100755
--- a/helpers/lh_bootstrap_debootstrap
+++ b/helpers/lh_bootstrap_debootstrap
@@ -79,7 +79,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
@@ -94,7 +99,12 @@ then
fi
# Executing debootstrap (download-only)
- debootstrap ${DEBOOTSTRAP_OPTIONS} --download-only "${LIVE_DISTRIBUTION}" chroot "${LIVE_MIRROR_BUILD}" "${LIVE_DEBOOTSTRAP_SCRIPT}"
+ ${LH_ROOT_COMMAND} debootstrap ${DEBOOTSTRAP_OPTIONS} --download-only "${LIVE_DISTRIBUTION}" chroot "${LIVE_MIRROR_BUILD}" "${LIVE_DEBOOTSTRAP_SCRIPT}"
+
+ if [ -n "${LH_ROOT_COMMAND}" ]
+ then
+ ${LH_ROOT_COMMAND} chown -R `whoami`:`whoami` chroot
+ fi
# Removing old cache
if [ -d cache/bootstrap ]
@@ -112,7 +122,12 @@ then
fi
# Executing debootstrap (regular run)
- debootstrap ${DEBOOTSTRAP_OPTIONS} "${LIVE_DISTRIBUTION}" chroot "${LIVE_MIRROR_BUILD}" "${LIVE_DEBOOTSTRAP_SCRIPT}"
+ ${LH_ROOT_COMMAND} debootstrap ${DEBOOTSTRAP_OPTIONS} "${LIVE_DISTRIBUTION}" chroot "${LIVE_MIRROR_BUILD}" "${LIVE_DEBOOTSTRAP_SCRIPT}"
+
+ if [ -n "${LH_ROOT_COMMAND}" ]
+ then
+ ${LH_ROOT_COMMAND} chown -R `whoami`:`whoami` chroot
+ fi
# Removing bootstrap cache
rm -rf chroot/var/cache/apt/archives/*.deb
@@ -125,7 +140,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