summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSimon Rettberg2019-02-14 13:42:16 +0100
committerSimon Rettberg2019-02-14 13:42:16 +0100
commitb237c6e22e716f6cc2b12f61d9350825d9d20d49 (patch)
treead834753f52a906cfb341f767829267109fe3d7e
parent[SSUS] Update/Install ldadp from source (diff)
downloadsetup-scripts-b237c6e22e716f6cc2b12f61d9350825d9d20d49.tar.gz
setup-scripts-b237c6e22e716f6cc2b12f61d9350825d9d20d49.tar.xz
setup-scripts-b237c6e22e716f6cc2b12f61d9350825d9d20d49.zip
[SSUS] Fix tmate install to check for distro version
-rwxr-xr-xsatellit_upgrader/pack-update.sh1
-rw-r--r--satellit_upgrader/updater.template.sh18
2 files changed, 12 insertions, 7 deletions
diff --git a/satellit_upgrader/pack-update.sh b/satellit_upgrader/pack-update.sh
index dc4112c..126e441 100755
--- a/satellit_upgrader/pack-update.sh
+++ b/satellit_upgrader/pack-update.sh
@@ -29,7 +29,6 @@ declare -rg TGZ_TASKMANAGER="files/taskmanager.tar.gz"
declare -rg TGZ_TFTP="files/tftpdir.tar.gz"
declare -rg TGZ_IPXE="files/ipxe.tar.gz"
-
declare -rg FILES_IPXE="
pxelinux.0
src/
diff --git a/satellit_upgrader/updater.template.sh b/satellit_upgrader/updater.template.sh
index 052de70..771ad3e 100644
--- a/satellit_upgrader/updater.template.sh
+++ b/satellit_upgrader/updater.template.sh
@@ -604,12 +604,18 @@ if [ -n "$TGZ_LDADP" ]; then
fi
# ************************** tmate ************************
-if ! which tmate > /dev/null 2>&1; then
+if [ "$( lsb_release -cs )" != "jessie" ]; 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
echo "* Installing tmate"
- echo "deb http://ftp.debian.org/debian jessie-backports main" > /etc/apt/sources.list.d/10-added_repos.list
- echo "Running apt update..."
- if ! failprint apt-get update; then
- pwarning "Adding backports repo: update failed"
+ if [ "$( lsb_release -cs )" = "jessie" ]; then
+ echo "deb http://ftp.debian.org/debian jessie-backports main" > "/etc/apt/sources.list.d/10-added_repos.list"
+ echo "Running apt update..."
+ if ! failprint apt-get update; then
+ pwarning "Adding backports repo: update failed"
+ fi
fi
echo "Installing package..."
if ! failprint apt-get install -y tmate; then
@@ -625,7 +631,7 @@ if ! which tmate > /dev/null 2>&1; then
set -g tmate-identity ""
JUSTANOTHERDOC
- if which tmate > /dev/null 2>&1; then
+ if which tmate &> /dev/null; then
echo "tmate installation complete!"
fi
fi