diff --git a/common/helpers b/common/helpers index 67e1707..0681904 100644 --- a/common/helpers +++ b/common/helpers @@ -120,5 +120,20 @@ failonme() distlevel() { - echo "15.5" + ( + if [ -f /etc/os-release ]; then + . /etc/os-release + else + echo "The file /etc/os-release was not found. The distribution cannot be identified." + exit 1 + fi + case $ID in + opensuse*|sles) + echo "$VERSION_ID" + ;; + grommunio-lds|*) + echo "15.6" + ;; + esac + ) } diff --git a/common/repo b/common/repo index fd19446..83e8919 100644 --- a/common/repo +++ b/common/repo @@ -25,7 +25,7 @@ setup_repo() { [grommunio] enabled=1 autorefresh=1 -baseurl=https://${REPO_USER}:${REPO_PASS}@download.grommunio.com/${REPO_PATH}/openSUSE_Leap_$(distlevel)/?ssl_verify=no +baseurl=https://${REPO_USER}:${REPO_PASS}@download.grommunio.com/${REPO_PATH}/openSUSE_Leap_$(distlevel) type=rpm-md EOF else @@ -35,7 +35,7 @@ EOF [grommunio] enabled=1 autorefresh=1 -baseurl=https://download.grommunio.com/${REPO_PATH}/openSUSE_Leap_$(distlevel)/?ssl_verify=no +baseurl=https://download.grommunio.com/${REPO_PATH}/openSUSE_Leap_$(distlevel) type=rpm-md EOF fi