mirror of
https://github.com/saltstack/salt-bootstrap.git
synced 2025-04-16 09:40:21 +00:00
Add a stubber support for Ubuntu 21.04 non-LTS to use Ubuntu 20.04 packages.
This commit is contained in:
parent
db924b4e81
commit
a12ffd379c
1 changed files with 15 additions and 2 deletions
|
@ -1457,6 +1457,9 @@ __ubuntu_codename_translation() {
|
|||
"20")
|
||||
DISTRO_CODENAME="focal"
|
||||
;;
|
||||
"21")
|
||||
DISTRO_CODENAME="hirsute"
|
||||
;;
|
||||
*)
|
||||
DISTRO_CODENAME="trusty"
|
||||
;;
|
||||
|
@ -2911,7 +2914,7 @@ __enable_universe_repository() {
|
|||
}
|
||||
|
||||
__install_saltstack_ubuntu_repository() {
|
||||
# Workaround for latest non-LTS ubuntu
|
||||
# Workaround for non-LTS ubuntu 20.10
|
||||
if { [ "$DISTRO_MAJOR_VERSION" -eq 20 ] && [ "$DISTRO_MINOR_VERSION" -eq 10 ]; }; then
|
||||
echowarn "Non-LTS Ubuntu detected, but stable packages requested. Trying packages for previous LTS release. You may experience problems."
|
||||
UBUNTU_VERSION=20.04
|
||||
|
@ -2921,6 +2924,16 @@ __install_saltstack_ubuntu_repository() {
|
|||
UBUNTU_CODENAME=${DISTRO_CODENAME}
|
||||
fi
|
||||
|
||||
# Workaround for latest non-LTS ubuntu 21.04
|
||||
if { [ "$DISTRO_MAJOR_VERSION" -eq 21 ] && [ "$DISTRO_MINOR_VERSION" -eq 04 ]; }; then
|
||||
echowarn "Non-LTS Ubuntu detected, but stable packages requested. Trying packages for previous LTS release. You may experience problems."
|
||||
UBUNTU_VERSION=20.04
|
||||
UBUNTU_CODENAME="focal"
|
||||
else
|
||||
UBUNTU_VERSION=${DISTRO_VERSION}
|
||||
UBUNTU_CODENAME=${DISTRO_CODENAME}
|
||||
fi
|
||||
|
||||
# Install downloader backend for GPG keys fetching
|
||||
__PACKAGES='wget'
|
||||
|
||||
|
@ -3035,7 +3048,7 @@ install_ubuntu_stable_deps() {
|
|||
|
||||
if [ "${_UPGRADE_SYS}" -eq $BS_TRUE ]; then
|
||||
if [ "${_INSECURE_DL}" -eq $BS_TRUE ]; then
|
||||
if [ "$DISTRO_MAJOR_VERSION" -ge 20 ]; then
|
||||
if [ "$DISTRO_MAJOR_VERSION" -ge 20 ] || [ "$DISTRO_MAJOR_VERSION" -ge 21 ]; then
|
||||
__apt_get_install_noinput --allow-unauthenticated debian-archive-keyring && apt-get update || return 1
|
||||
else
|
||||
__apt_get_install_noinput --allow-unauthenticated debian-archive-keyring &&
|
||||
|
|
Loading…
Add table
Reference in a new issue