diff options
Diffstat (limited to 'helpers/lh_bootstrap_cdebootstrap')
-rwxr-xr-x | helpers/lh_bootstrap_cdebootstrap | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/helpers/lh_bootstrap_cdebootstrap b/helpers/lh_bootstrap_cdebootstrap index b6ea6b910..2430cc8c5 100755 --- a/helpers/lh_bootstrap_cdebootstrap +++ b/helpers/lh_bootstrap_cdebootstrap @@ -25,11 +25,19 @@ Arguments "${@}" # Ensure that a system is built as root lh_testroot +# Starting helper +Echo_debug "Init ${PROGRAM}" + # Reading configuration files Read_conffile config/common Read_conffile config/bootstrap Set_defaults +if [ "${LH_BOOTSTRAP}" != "cdebootstrap" ] +then + exit 0 +fi + # Checking stage file Check_stagefile .stage/bootstrap @@ -63,11 +71,36 @@ else CDEBOOTSTRAP_OPTIONS="${CDEBOOTSTRAP_OPTIONS} --flavour=minimal" fi +if [ "${DEBUG}" = "true" ] +then + CDEBOOTSTRAP_OPTIONS="${CDEBOOTSTRAP_OPTIONS} --debug" +fi + +if [ "${QUIET}" = "true" ] +then + CDEBOOTSTRAP_OPTIONS="${CDEBOOTSTRAP_OPTIONS} --quiet" +fi + +if [ "${VERBOSE}" = "true" ] +then + CDEBOOTSTRAP_OPTIONS="${CDEBOOTSTRAP_OPTIONS} --verbose" +fi + if [ -x "/usr/bin/cdebootstrap" ] then if [ "${LH_CACHE}" = "enabled" ] then # Restore old cache + if [ -d cache/chroot_bootstrap ] + then + cp -a cache/chroot_bootstrap/* chroot + + # Creating stage file + Create_stagefile .stage/bootstrap + + exit 0 + fi + if [ -d cache/bootstrap ] then mkdir -p chroot/var/cache/bootstrap @@ -107,6 +140,17 @@ then rm -rf chroot/var/cache/bootstrap fi + # Saving new cache + if [ "${LH_CACHE}" = "enabled" ] + then + if [ -d cache/chroot_bootstrap ] + then + rm -rf cache/chroot_bootstrap + fi + + cp -a chroot cache/chroot_bootstrap + fi + # Creating stage file Create_stagefile .stage/bootstrap else |