From 92428a6044daacd43f23cc78a3c32828f3fd3e38 Mon Sep 17 00:00:00 2001 From: Justin Landmann Date: Fri, 8 Apr 2022 13:34:39 +0200 Subject: [PATCH] Change codename gathering to /etc/os-release Signed-off-by: Justin Landmann --- install.sh | 32 ++------------------------------ 1 file changed, 2 insertions(+), 30 deletions(-) diff --git a/install.sh b/install.sh index 81a0be42..7a809ed2 100755 --- a/install.sh +++ b/install.sh @@ -242,21 +242,7 @@ check_forked() { # We're Debian and don't even know it! lsb_dist=debian fi - dist_version="$(sed 's/\/.*//' /etc/debian_version | sed 's/\..*//')" - case "$dist_version" in - 11) - dist_version="bullseye" - ;; - 10) - dist_version="buster" - ;; - 9) - dist_version="stretch" - ;; - 8) - dist_version="jessie" - ;; - esac + dist_version="$(sed -n 's/^VERSION_CODENAME=//p' < /etc/os-release )" fi fi fi @@ -330,21 +316,7 @@ do_install() { ;; debian|raspbian) - dist_version="$(sed 's/\/.*//' /etc/debian_version | sed 's/\..*//')" - case "$dist_version" in - 11) - dist_version="bullseye" - ;; - 10) - dist_version="buster" - ;; - 9) - dist_version="stretch" - ;; - 8) - dist_version="jessie" - ;; - esac + dist_version="$(sed -n 's/^VERSION_CODENAME=//p' < /etc/os-release )" ;; centos|rhel|sles)