From 3f9f53aff37e4db669c5e488c84b40b44ec7bc10 Mon Sep 17 00:00:00 2001 From: Marco Molteni Date: Sat, 17 Dec 2016 21:42:49 +0100 Subject: [PATCH 1/2] Handle renaming of gnupg-curl to gnupg1-curl for Ubuntu 16.10 --- bootstrap-salt.sh | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/bootstrap-salt.sh b/bootstrap-salt.sh index ce8e55d..2c61cba 100755 --- a/bootstrap-salt.sh +++ b/bootstrap-salt.sh @@ -1459,6 +1459,15 @@ if ([ "${DISTRO_NAME_L}" != "ubuntu" ] && [ $_PIP_ALL -eq $BS_TRUE ]);then exit 1 fi +# Hack proof of concept. Feel free to refactor properly. +# Starting from Ubuntu 16.01, gnupg-curl has been renamed to gnupg1-curl. +GNUPG_CURL="gnupg-curl" +if ([ "${DISTRO_NAME_L}" = "ubuntu" ] && [ ${DISTRO_VERSION} = "16.10" ]); then + GNUPG_CURL="gnupg1-curl" +fi + + + #--- FUNCTION ------------------------------------------------------------------------------------------------------- # NAME: __function_defined # DESCRIPTION: Checks if a function is defined within this scripts scope @@ -1503,7 +1512,7 @@ __apt_get_upgrade_noinput() { __apt_key_fetch() { url=$1 - __apt_get_install_noinput gnupg-curl || return 1 + __apt_get_install_noinput ${GNUPG_CURL} || return 1 # shellcheck disable=SC2086 apt-key adv ${_GPG_ARGS} --fetch-keys "$url"; return $? From 13919948be3b05bd6d3632d5cbb0b378c29fdba1 Mon Sep 17 00:00:00 2001 From: Marco Molteni Date: Sun, 18 Dec 2016 14:28:53 +0100 Subject: [PATCH 2/2] Add missing double quotes --- bootstrap-salt.sh | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/bootstrap-salt.sh b/bootstrap-salt.sh index 2c61cba..dfeccea 100755 --- a/bootstrap-salt.sh +++ b/bootstrap-salt.sh @@ -1459,10 +1459,9 @@ if ([ "${DISTRO_NAME_L}" != "ubuntu" ] && [ $_PIP_ALL -eq $BS_TRUE ]);then exit 1 fi -# Hack proof of concept. Feel free to refactor properly. -# Starting from Ubuntu 16.01, gnupg-curl has been renamed to gnupg1-curl. +# Starting from Ubuntu 16.10, gnupg-curl has been renamed to gnupg1-curl. GNUPG_CURL="gnupg-curl" -if ([ "${DISTRO_NAME_L}" = "ubuntu" ] && [ ${DISTRO_VERSION} = "16.10" ]); then +if ([ "${DISTRO_NAME_L}" = "ubuntu" ] && [ "${DISTRO_VERSION}" = "16.10" ]); then GNUPG_CURL="gnupg1-curl" fi