summaryrefslogtreecommitdiffstats
path: root/satellit_upgrader
diff options
context:
space:
mode:
authorSimon Rettberg2019-03-28 10:22:40 +0100
committerSimon Rettberg2019-03-28 10:22:40 +0100
commit67c930b70f53d4bf92c42f7a99888180437ec368 (patch)
tree7d9974c259fa1075b09aa2c8aa1fbeb66cfdeae1 /satellit_upgrader
parent[SSUS] Require manual --version spec (diff)
downloadsetup-scripts-67c930b70f53d4bf92c42f7a99888180437ec368.tar.gz
setup-scripts-67c930b70f53d4bf92c42f7a99888180437ec368.tar.xz
setup-scripts-67c930b70f53d4bf92c42f7a99888180437ec368.zip
[SSUS] Handle updating old Debian 8 32Bit installs
Diffstat (limited to 'satellit_upgrader')
-rw-r--r--satellit_upgrader/updater.template.sh35
1 files changed, 25 insertions, 10 deletions
diff --git a/satellit_upgrader/updater.template.sh b/satellit_upgrader/updater.template.sh
index 478ce81..24b4055 100644
--- a/satellit_upgrader/updater.template.sh
+++ b/satellit_upgrader/updater.template.sh
@@ -125,6 +125,16 @@ aptinst () {
if ! dpkg -l "$pkg" 2> /dev/null | grep -q "^ii\\s.*$pkg"; then
if ! $aptupdate; then
echo "Updating apt db"
+ # Kill this file; was accidentally put there on stretch; on jessie it's not
+ # 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)
+ sed -r -i '/^\s*#.*jessie-updates/s/^\s*#//;s/jessie-updates/stretch-updates/' "/etc/apt/sources.list"
+ fi
failprint apt-get update || perror "Cannot run apt-get update"
aptupdate=true
fi
@@ -165,6 +175,20 @@ declare -rg PATH_LDADP="/opt/ldadp"
declare -rg PATH_DNBD3="/opt/openslx/dnbd3"
declare -rg PACKAGE_LIBJANSSON="libjansson-dev" # needed by 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"
@@ -645,19 +669,10 @@ if [ -n "$TGZ_LDADP" ]; then
fi
# ************************** tmate ************************
-if [ "$MAJOR" -gt 8 ]; then
- # Kill this file; was accidentally put there on stretch
- rm -f -- "/etc/apt/sources.list.d/10-added_repos.list"
-fi
-if ! which tmate &> /dev/null; then
+if ! which tmate &> /dev/null && [ "$MAJOR" -ge 9 ]; then
echo "* Installing tmate"
- if [ "$MAJOR" -eq 8 ]; then
- echo "deb http://ftp.debian.org/debian jessie-backports main" > "/etc/apt/sources.list.d/10-added_repos.list"
- aptupdate=false
- fi
if ! aptinst tmate; then
pwarning "Could not install tmate. Easy remote assistance will not be available."
- [ "$MAJOR" -eq 8 ] && pwarning "Please check whether repo 'jessie-backports' was added and install by hand."
fi
echo "Writing config..."
cat > /root/.tmate.conf <<-JUSTANOTHERDOC