diff options
author | Daniel Baumann <daniel@debian.org> | 2007-09-23 10:04:47 +0200 |
---|---|---|
committer | Daniel Baumann <daniel@debian.org> | 2011-03-09 18:18:28 +0100 |
commit | 677415f6d7efc1e5b888570d70af311d2900c69c (patch) | |
tree | 32fe7ced768666c229fff913fe12cbbf2fdd34e4 /helpers/lh_bootstrap_debootstrap | |
parent | 811ff0532fcb3305ebefcd1d61e4eb6c260902eb (diff) | |
download | vyos-live-build-677415f6d7efc1e5b888570d70af311d2900c69c.tar.gz vyos-live-build-677415f6d7efc1e5b888570d70af311d2900c69c.zip |
Adding live-helper 1.0~a2-1.
Diffstat (limited to 'helpers/lh_bootstrap_debootstrap')
-rwxr-xr-x | helpers/lh_bootstrap_debootstrap | 40 |
1 files changed, 17 insertions, 23 deletions
diff --git a/helpers/lh_bootstrap_debootstrap b/helpers/lh_bootstrap_debootstrap index 42009cbc5..8ff83af48 100755 --- a/helpers/lh_bootstrap_debootstrap +++ b/helpers/lh_bootstrap_debootstrap @@ -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 debootstrap options @@ -53,41 +47,41 @@ fi if [ -x "/usr/sbin/debootstrap" ] then # Restore old cache - if [ -d "${LIVE_ROOT}"/cache/bootstrap ] + if [ -d cache/bootstrap ] then - mkdir -p "${LIVE_CHROOT}"/var/cache/apt/archives - cp "${LIVE_ROOT}"/cache/bootstrap/*.deb "${LIVE_CHROOT}"/var/cache/apt/archives + mkdir -p chroot/var/cache/apt/archives + cp cache/bootstrap/*.deb chroot/var/cache/apt/archives fi if [ "${LH_CACHE}" = "enabled" ] then # Executing debootstrap (download-only) - debootstrap ${DEBOOTSTRAP_OPTIONS} --download-only "${LIVE_DISTRIBUTION}" "${LIVE_CHROOT}" "${LIVE_MIRROR}" "${LIVE_DEBOOTSTRAP_SCRIPT}" + debootstrap ${DEBOOTSTRAP_OPTIONS} --download-only "${LIVE_DISTRIBUTION}" chroot "${LIVE_MIRROR_LOCAL}" "${LIVE_DEBOOTSTRAP_SCRIPT}" # 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/apt/archives/*.deb "${LIVE_ROOT}"/cache/bootstrap + cp chroot/var/cache/apt/archives/*.deb cache/bootstrap fi # Executing debootstrap (regular run) - debootstrap ${DEBOOTSTRAP_OPTIONS} "${LIVE_DISTRIBUTION}" "${LIVE_CHROOT}" "${LIVE_MIRROR}" "${LIVE_DEBOOTSTRAP_SCRIPT}" + debootstrap ${DEBOOTSTRAP_OPTIONS} "${LIVE_DISTRIBUTION}" chroot "${LIVE_MIRROR_LOCAL}" "${LIVE_DEBOOTSTRAP_SCRIPT}" else echo "E: Can't process file /usr/bin/debootstrap (FIXME)" exit 1 fi # Removing bootstrap cache -rm -rf "${LIVE_CHROOT}"/var/cache/apt/archives/*.deb +rm -rf chroot/var/cache/apt/archives/*.deb # Creating stage file -Create_stagefile "${LIVE_ROOT}"/.stage/bootstrap +Create_stagefile .stage/bootstrap |