Skip to content

Commit 1b98100

Browse files
committed
Removed unused variable
1 parent e4b43b0 commit 1b98100

1 file changed

Lines changed: 22 additions & 19 deletions

File tree

bootstrap-salt.sh

Lines changed: 22 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
#======================================================================================================================
2727
set -o nounset # Treat unset variables as an error
2828

29-
__ScriptVersion="2024.11.29"
29+
__ScriptVersion="2024.12.03"
3030
__ScriptName="bootstrap-salt.sh"
3131

3232
__ScriptFullName="$0"
@@ -6634,36 +6634,39 @@ __ZYPPER_REQUIRES_REPLACE_FILES=-1
66346634

66356635
__set_suse_pkg_repo() {
66366636

6637-
# Set distro repo variable
6638-
if [ "${DISTRO_MAJOR_VERSION}" -gt 2015 ]; then
6639-
DISTRO_REPO="openSUSE_Tumbleweed"
6640-
elif [ "${DISTRO_MAJOR_VERSION}" -eq 15 ] && [ "${DISTRO_MINOR_VERSION}" -ge 4 ]; then
6641-
DISTRO_REPO="${DISTRO_MAJOR_VERSION}.${DISTRO_MINOR_VERSION}"
6642-
elif [ "${DISTRO_MAJOR_VERSION}" -ge 42 ] || [ "${DISTRO_MAJOR_VERSION}" -eq 15 ]; then
6643-
DISTRO_REPO="openSUSE_Leap_${DISTRO_MAJOR_VERSION}.${DISTRO_MINOR_VERSION}"
6644-
else
6645-
DISTRO_REPO="SLE_${DISTRO_MAJOR_VERSION}_SP${SUSE_PATCHLEVEL}"
6646-
fi
6637+
## DGM # Set distro repo variable
6638+
## DGM if [ "${DISTRO_MAJOR_VERSION}" -gt 2015 ]; then
6639+
## DGM DISTRO_REPO="openSUSE_Tumbleweed"
6640+
## DGM elif [ "${DISTRO_MAJOR_VERSION}" -eq 15 ] && [ "${DISTRO_MINOR_VERSION}" -ge 4 ]; then
6641+
## DGM DISTRO_REPO="${DISTRO_MAJOR_VERSION}.${DISTRO_MINOR_VERSION}"
6642+
## DGM elif [ "${DISTRO_MAJOR_VERSION}" -ge 42 ] || [ "${DISTRO_MAJOR_VERSION}" -eq 15 ]; then
6643+
## DGM DISTRO_REPO="openSUSE_Leap_${DISTRO_MAJOR_VERSION}.${DISTRO_MINOR_VERSION}"
6644+
## DGM else
6645+
## DGM DISTRO_REPO="SLE_${DISTRO_MAJOR_VERSION}_SP${SUSE_PATCHLEVEL}"
6646+
## DGM fi
66476647

6648-
suse_pkg_url_base="https://download.opensuse.org/repositories/systemsmanagement:/saltstack"
6649-
suse_pkg_url_path="${DISTRO_REPO}/systemsmanagement:saltstack.repo"
6650-
SUSE_PKG_URL="$suse_pkg_url_base/$suse_pkg_url_path"
6648+
## DGM suse_pkg_url_base="https://download.opensuse.org/repositories/systemsmanagement:/saltstack"
6649+
## DGM suse_pkg_url_path="${DISTRO_REPO}/systemsmanagement:saltstack.repo"
6650+
## DGM SUSE_PKG_URL="$suse_pkg_url_base/$suse_pkg_url_path"
6651+
SUSE_PKG_URL="https://github.com/saltstack/salt-install-guide/releases/latest/download/salt.repo"
66516652
}
66526653

66536654
__check_and_refresh_suse_pkg_repo() {
66546655
# Check to see if systemsmanagement_saltstack exists
6655-
__zypper repos | grep -q systemsmanagement_saltstack
6656+
## DGM __zypper repos | grep -q systemsmanagement_saltstack
6657+
__zypper repos | grep -q 'salt.repo'
66566658

66576659
if [ $? -eq 1 ]; then
6658-
# zypper does not yet know anything about systemsmanagement_saltstack
6660+
## DGM # zypper does not yet know anything about systemsmanagement_saltstack
6661+
# zypper does not yet know anything about salt.repo
66596662
__zypper addrepo --refresh "${SUSE_PKG_URL}" || return 1
66606663
fi
66616664
}
66626665

66636666
__version_lte() {
6664-
if ! __check_command_exists python; then
6665-
zypper --non-interactive install --replacefiles --auto-agree-with-licenses python || \
6666-
zypper --non-interactive install --auto-agree-with-licenses python || return 1
6667+
if ! __check_command_exists python3; then
6668+
zypper --non-interactive install --replacefiles --auto-agree-with-licenses python3 || \
6669+
zypper --non-interactive install --auto-agree-with-licenses python3 || return 1
66676670
fi
66686671

66696672
if [ "$(${_PY_EXE} -c 'import sys; V1=tuple([int(i) for i in sys.argv[1].split(".")]); V2=tuple([int(i) for i in sys.argv[2].split(".")]); print(V1<=V2)' "$1" "$2")" = "True" ]; then

0 commit comments

Comments
 (0)