From e6787d97ddbf3477f417eedc1705179d002267b5 Mon Sep 17 00:00:00 2001 From: Simon Rettberg Date: Tue, 7 Jan 2020 16:35:30 +0100 Subject: [SSUS] Drop support for jessie, handle stretch and buster --- satellit_upgrader/updater.template.sh | 28 ++++++++-------------------- 1 file changed, 8 insertions(+), 20 deletions(-) diff --git a/satellit_upgrader/updater.template.sh b/satellit_upgrader/updater.template.sh index 4347bed..1928cbf 100644 --- a/satellit_upgrader/updater.template.sh +++ b/satellit_upgrader/updater.template.sh @@ -17,11 +17,13 @@ fi MAJOR=$(lsb_release -sr) MAJOR=${MAJOR%%.*} readonly MAJOR -if [ "${MAJOR}" -lt 8 ]; then +if [ "${MAJOR}" -lt 9 ]; then echo "This Version of the bwLehrpool Satellite Server is too old!" + echo "Back up your existing configuration via slx-admin and import it into a" + echo "fresh install, or manually dist-upgrade this server." exit 1 fi -if [ "${MAJOR}" -gt 9 ]; then +if [ "${MAJOR}" -gt 10 ]; then echo "This Version of the bwLehrpool Satellite Server is too new!" exit 1 fi @@ -129,11 +131,11 @@ aptinst () { # supported anymore as of 2019-03-20 rm -f -- "/etc/apt/sources.list.d/10-added_repos.list" # No more updates for pre-point release updates on jessie - if [ "$MAJOR" -eq 8 ]; then - sed -r -i '/^\s*[^#].*jessie-updates/s/^/#/' "/etc/apt/sources.list" - elif [ "$MAJOR" -eq 9 ]; then - # But re-enable (in case it was dist-upgraded) + # But re-enable (in case it was dist-upgraded) + if [ "$MAJOR" -eq 9 ]; then sed -r -i '/^\s*#.*jessie-updates/s/^\s*#//;s/jessie-updates/stretch-updates/' "/etc/apt/sources.list" + elif [ "$MAJOR" -eq 10 ]; then + sed -r -i '/^\s*#.*jessie-updates/s/^\s*#//;s/jessie-updates/buster-updates/' "/etc/apt/sources.list" fi failprint apt-get update || perror "Cannot run apt-get update" aptupdate=true @@ -174,20 +176,6 @@ declare -rg PATH_IPXE="/opt/openslx/ipxe" declare -rg PATH_LDADP="/opt/ldadp" declare -rg PATH_DNBD3="/opt/openslx/dnbd3" -if [ "$MAJOR" -eq 8 ]; then - echo "* * * * * * * * * * * * * * * * * * *" - echo "* !! WARNING !! *" - echo "* This Server is still running *" - echo "* Debian 8, which will cease to *" - echo "* receive security updates as of *" - echo "* June 2020. Consider upgrading to *" - echo "* Debian 9 by dist-upgrading, or *" - echo "* Install the latest bwLehrpool *" - echo "* Satellite server and import your *" - echo "* old config. *" - echo "* * * * * * * * * * * * * * * * * * *" -fi - # ** Check if constants have been filled, bail out otherwise if [ -z "$TARGET_WEBIF_VERSION" ] || [[ "$TARGET_WEBIF_VERSION" == %*% ]]; then [ -n "$TGZ_SLXADMIN" ] && perror "Bad upgrader: TARGET_WEBIF_VERSION not set" -- cgit v1.2.3-55-g7522