From 623050ec2ad92a72d9ceecf9a230d6434a0887a1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marek=20Smoli=C5=84ski?= Date: Wed, 28 Jun 2023 11:42:30 +0200 Subject: [PATCH] Fix installer.sh.tmpl unbound variable --- api/types/installers/installer.sh.tmpl | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/api/types/installers/installer.sh.tmpl b/api/types/installers/installer.sh.tmpl index a7bcd4b2ebe14..4d37f21248e1f 100644 --- a/api/types/installers/installer.sh.tmpl +++ b/api/types/installers/installer.sh.tmpl @@ -7,15 +7,11 @@ . /etc/os-release - # old versions of ubuntu require that keys get added by `apt-key add`, without - # adding the key apt shows a key signing error when installing teleport. - LEGACY_UBUNTU=false - if [ "$VERSION_CODENAME" = "xenial" ] || [ "$VERSION_CODENAME" = "trusty" ]; then - LEGACY_UBUNTU=true - fi if [ "$ID" = "debian" ] || [ "$ID" = "ubuntu" ]; then - if [ "$LEGACY_UBUNTU" = true ]; then + # old versions of ubuntu require that keys get added by `apt-key add`, without + # adding the key apt shows a key signing error when installing teleport. + if [ "$VERSION_CODENAME" = "xenial" ] || [ "$VERSION_CODENAME" = "trusty" ]; then curl -o /tmp/teleport-pubkey.asc https://deb.releases.teleport.dev/teleport-pubkey.asc cat /tmp/teleport-pubkey.asc | sudo apt-key add - echo "deb https://apt.releases.teleport.dev/ubuntu ${VERSION_CODENAME?} stable/{{ .MajorVersion }}" | sudo tee /etc/apt/sources.list.d/teleport.list