summaryrefslogtreecommitdiff
path: root/helpers/lh_bootstrap_cdebootstrap
diff options
context:
space:
mode:
authorDaniel Baumann <daniel@debian.org>2007-09-23 10:04:47 +0200
committerDaniel Baumann <daniel@debian.org>2011-03-09 18:18:28 +0100
commit677415f6d7efc1e5b888570d70af311d2900c69c (patch)
tree32fe7ced768666c229fff913fe12cbbf2fdd34e4 /helpers/lh_bootstrap_cdebootstrap
parent811ff0532fcb3305ebefcd1d61e4eb6c260902eb (diff)
downloadvyos-live-build-677415f6d7efc1e5b888570d70af311d2900c69c.tar.gz
vyos-live-build-677415f6d7efc1e5b888570d70af311d2900c69c.zip
Adding live-helper 1.0~a2-1.
Diffstat (limited to 'helpers/lh_bootstrap_cdebootstrap')
-rwxr-xr-xhelpers/lh_bootstrap_cdebootstrap42
1 files changed, 18 insertions, 24 deletions
diff --git a/helpers/lh_bootstrap_cdebootstrap b/helpers/lh_bootstrap_cdebootstrap
index c5602a6e1..e4b83a2e7 100755
--- a/helpers/lh_bootstrap_cdebootstrap
+++ b/helpers/lh_bootstrap_cdebootstrap
@@ -19,24 +19,18 @@ Read_conffile config/bootstrap
Set_defaults
# Checking stage file
-Check_stagefile "${LIVE_ROOT}"/.stage/bootstrap
+Check_stagefile .stage/bootstrap
# Checking lock file
-Check_lockfile "${LIVE_ROOT}"/.lock
+Check_lockfile .lock
# Creating lock file
-Create_lockfile "${LIVE_ROOT}"/.lock
-
-# Creating root directory
-if [ ! -d "${LIVE_ROOT}" ]
-then
- mkdir -p "${LIVE_ROOT}"
-fi
+Create_lockfile .lock
# Creating chroot directory
-if [ ! -d "${LIVE_CHROOT}" ]
+if [ ! -d chroot ]
then
- mkdir -p "${LIVE_CHROOT}"
+ mkdir -p chroot
fi
# Setting cdebootstrap options
@@ -60,44 +54,44 @@ fi
if [ -x "/usr/bin/cdebootstrap" ]
then
# Restore old cache
- if [ -d "${LIVE_ROOT}"/cache/bootstrap ]
+ if [ -d cache/bootstrap ]
then
- mkdir -p "${LIVE_CHROOT}"/var/cache/bootstrap
- cp "${LIVE_ROOT}"/cache/bootstrap/*.deb "${LIVE_CHROOT}"/var/cache/bootstrap
+ mkdir -p chroot/var/cache/bootstrap
+ cp cache/bootstrap/*.deb chroot/var/cache/bootstrap
fi
if [ "${LH_CACHE}" = "enabled" ]
then
# Executing cdebootstrap (download-only)
- cdebootstrap ${CDEBOOTSTRAP_OPTIONS} --download-only "${LIVE_DISTRIBUTION}" "${LIVE_CHROOT}" "${LIVE_MIRROR}"
+ cdebootstrap ${CDEBOOTSTRAP_OPTIONS} --download-only "${LIVE_DISTRIBUTION}" chroot "${LIVE_MIRROR_LOCAL}"
# Removing old cache
- if [ -d "${LIVE_ROOT}"/cache/bootstrap ]
+ if [ -d cache/bootstrap ]
then
- rm -f "${LIVE_ROOT}"/cache/bootstrap/*.deb
+ rm -f cache/bootstrap/*.deb
fi
# Saving new cache
- if [ ! -d "${LIVE_ROOT}"/cache/bootstrap ]
+ if [ ! -d cache/bootstrap ]
then
- mkdir -p "${LIVE_ROOT}"/cache/bootstrap
+ mkdir -p cache/bootstrap
fi
- cp "${LIVE_CHROOT}"/var/cache/bootstrap/*.deb "${LIVE_ROOT}"/cache/bootstrap
+ cp chroot/var/cache/bootstrap/*.deb cache/bootstrap
fi
# Executing cdebootstrap (regular run)
- cdebootstrap ${CDEBOOTSTRAP_OPTIONS} "${LIVE_DISTRIBUTION}" "${LIVE_CHROOT}" "${LIVE_MIRROR}"
+ cdebootstrap ${CDEBOOTSTRAP_OPTIONS} "${LIVE_DISTRIBUTION}" chroot "${LIVE_MIRROR_LOCAL}"
else
echo "E: Can't process file /usr/bin/cdebootstrap (FIXME)"
exit 1
fi
# Removing bootstrap cache
-if [ -d "${LIVE_CHROOT}/var/cache/bootstrap" ]
+if [ -d chroot/var/cache/bootstrap ]
then
- rm -rf "${LIVE_CHROOT}"/var/cache/bootstrap
+ rm -rf chroot/var/cache/bootstrap
fi
# Creating stage file
-Create_stagefile "${LIVE_ROOT}"/.stage/bootstrap
+Create_stagefile .stage/bootstrap