This commit is contained in:
Marc Beninca 2024-06-24 11:44:21 +02:00
parent 3a5a670311
commit 736a0174ed
Signed by: marc.beninca
GPG key ID: 9C7613450C80C24F

81
pidd.sh
View file

@ -72,56 +72,53 @@ pidd_set_environment_variables() {
esac
# set operating system version
case "${PIDD_OS_ID}" in
"${PIDD_OS_ALMA}" | "${PIDD_OS_ARCH}" | "${PIDD_OS_FEDORA}" | "${PIDD_OS_ROCKY}")
PIDD_OS_VERSION=$(pidd_grep_os VERSION_ID \
| sed "s|^\([0-9]\+\)\..*|\1|")
;;
"${PIDD_OS_ALPINE}")
PIDD_OS_VERSION=$(pidd_grep_os VERSION_ID \
| sed "s|^\([0-9]\+\.[0-9]\+\)\..*|\1|")
;;
"${PIDD_OS_DEBIAN}" | "${PIDD_OS_UBUNTU}")
PIDD_OS_VERSION="$(pidd_grep_os VERSION_CODENAME)"
;;
*) ;;
"${PIDD_OS_ALMA}" | "${PIDD_OS_ARCH}" | "${PIDD_OS_FEDORA}" | "${PIDD_OS_ROCKY}")
PIDD_OS_VERSION=$(pidd_grep_os VERSION_ID \
| sed "s|^\([0-9]\+\)\..*|\1|") ;;
"${PIDD_OS_ALPINE}")
PIDD_OS_VERSION=$(pidd_grep_os VERSION_ID \
| sed "s|^\([0-9]\+\.[0-9]\+\)\..*|\1|") ;;
"${PIDD_OS_DEBIAN}" | "${PIDD_OS_UBUNTU}")
PIDD_OS_VERSION="$(pidd_grep_os VERSION_CODENAME)" ;;
*) ;;
esac
# check operating system version
case "${PIDD_OS_ID}" in
"${PIDD_OS_ALMA}" | "${PIDD_OS_ROCKY}")
case "${PIDD_OS_VERSION}" in
"8" | "9") ;;
*) pidd_error_os "PIDD_OS_VERSION" ;;
esac
"${PIDD_OS_ALMA}" | "${PIDD_OS_ROCKY}")
case "${PIDD_OS_VERSION}" in
"8" | "9") ;;
*) pidd_error_os "PIDD_OS_VERSION" ;;
esac
;;
"${PIDD_OS_ALPINE}")
case "${PIDD_OS_VERSION}" in
"3.18" | "3.19") ;;
*) pidd_error_os "PIDD_OS_VERSION" ;;
esac
"${PIDD_OS_ALPINE}")
case "${PIDD_OS_VERSION}" in
"3.18" | "3.19") ;;
*) pidd_error_os "PIDD_OS_VERSION" ;;
esac
;;
"${PIDD_OS_ARCH}")
case "${PIDD_OS_VERSION}" in
"20231112" | "20240101") ;;
*) pidd_error_os "PIDD_OS_VERSION" ;;
esac
"${PIDD_OS_ARCH}")
case "${PIDD_OS_VERSION}" in
"20231112" | "20240101") ;;
*) pidd_error_os "PIDD_OS_VERSION" ;;
esac
;;
"${PIDD_OS_DEBIAN}")
case "${PIDD_OS_VERSION}" in
"bookworm" | "bullseye") ;;
*) pidd_error_os "PIDD_OS_VERSION" ;;
esac
"${PIDD_OS_DEBIAN}")
case "${PIDD_OS_VERSION}" in
"bookworm" | "bullseye") ;;
*) pidd_error_os "PIDD_OS_VERSION" ;;
esac
;;
"${PIDD_OS_FEDORA}")
case "${PIDD_OS_VERSION}" in
"39" | "40") ;;
*) pidd_error_os "PIDD_OS_VERSION" ;;
esac
"${PIDD_OS_FEDORA}")
case "${PIDD_OS_VERSION}" in
"39" | "40") ;;
*) pidd_error_os "PIDD_OS_VERSION" ;;
esac
;;
"${PIDD_OS_UBUNTU}")
case "${PIDD_OS_VERSION}" in
"jammy" | "noble") ;;
*) pidd_error_os "PIDD_OS_VERSION" ;;
esac
"${PIDD_OS_UBUNTU}")
case "${PIDD_OS_VERSION}" in
"jammy" | "noble") ;;
*) pidd_error_os "PIDD_OS_VERSION" ;;
esac
;;
*) ;;
esac