diff options
author | Richard Nelson <unixabg@gmail.com> | 2014-11-11 17:19:55 -0600 |
---|---|---|
committer | Richard Nelson <unixabg@gmail.com> | 2014-11-11 17:29:50 -0600 |
commit | 570a17053c7f52313e02196cf6dce10c6bb0c5cb (patch) | |
tree | 6e3a18f7ad19c90402cffa89f64d85a9c8ef1a3b /functions/defaults.sh | |
parent | ef03f67f817a9485f61975480985588db9cd6ea0 (diff) | |
download | vyos-live-build-570a17053c7f52313e02196cf6dce10c6bb0c5cb.tar.gz vyos-live-build-570a17053c7f52313e02196cf6dce10c6bb0c5cb.zip |
Applying slightly modified patch from Rui Miguel P. Bernardo <rui.bernardo.pt@gmail.com>tmp-snapshot
to provide support of --snapshot option for utilizing snapshot.debian.org.
Diffstat (limited to 'functions/defaults.sh')
-rwxr-xr-x | functions/defaults.sh | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/functions/defaults.sh b/functions/defaults.sh index feebdeef5..0b66633af 100755 --- a/functions/defaults.sh +++ b/functions/defaults.sh @@ -370,6 +370,19 @@ Set_defaults () ## config/bootstrap + # Setting snapshot.debian.org + if [ -n "${LB_SNAPSHOT}" ] + then + LB_MIRROR_BOOTSTRAP="${LB_MIRROR_BOOTSTRAP:-http://snapshot.debian.org/archive/debian/${LB_SNAPSHOT}}" + LB_PARENT_MIRROR_BOOTSTRAP="${LB_MIRROR_BOOTSTRAP}" + LB_MIRROR_CHROOT_SECURITY="${LB_MIRROR_CHROOT_SECURITY:-http://snapshot.debian.org/archive/debian-security/${LB_SNAPSHOT}}" + LB_PARENT_MIRROR_CHROOT_SECURITY="${LB_PARENT_MIRROR_CHROOT_SECURITY:-${LB_MIRROR_CHROOT_SECURITY}}" + LB_MIRROR_BINARY="${LB_MIRROR_BINARY:-http://snapshot.debian.org/archive/debian/${LB_SNAPSHOT}}" + LB_PARENT_MIRROR_BINARY="${LB_PARENT_MIRROR_BINARY:-${LB_MIRROR_BINARY}}" + LB_MIRROR_BINARY_SECURITY="${LB_MIRROR_BINARY_SECURITY:-http://snapshot.debian.org/archive/debian-security/${LB_SNAPSHOT}}" + LB_PARENT_MIRROR_BINARY_SECURITY="${LB_PARENT_MIRROR_BINARY_SECURITY:-${LB_MIRROR_BINARY_SECURITY}}" + fi + # Setting mirror to fetch packages from case "${LB_MODE}" in debian) @@ -1059,6 +1072,17 @@ Check_defaults () fi fi + if [ -n "${LB_SNAPSHOT}" ] && [ "${LB_DEBIAN_INSTALLER}" = "live" ] && [ "${LB_DEBIAN_INSTALLER_DISTRIBUTION}" = "daily" ] + then + DAILY_LIVE_INSTALLER="$(Dated_debian_installer_snapshot)" + # if there is no available daily installer + if [ -z "${DAILY_LIVE_INSTALLER}" ] + then + Echo_warning "You have selected the debian-snapshot option with daily live-installer, but there is no daily live installer available at that date. The selected date was ${LB_SNAPSHOT}" + Echo_warning "The last available daily installer before ${LB_SNAPSHOT} will be used. Please check http://d-i.debian.org/daily-images/ to see the oldest daily installer available." + fi + fi + if [ "${LB_BOOTLOADER}" = "syslinux" ] then # syslinux + fat or ntfs, or extlinux + ext[234] or btrfs |