File tree Expand file tree Collapse file tree 1 file changed +1
-1
lines changed Expand file tree Collapse file tree 1 file changed +1
-1
lines changed Original file line number Diff line number Diff line change @@ -36,7 +36,7 @@ for distro_info in "${distro_info_array[@]}"; do
36
36
distroname=" $( grep " PRETTY_NAME" /etc/os-release | awk -F\= ' {gsub(/"/,"",$2);print $2}' ) "
37
37
distroversion=" $( grep " VERSION_ID" /etc/os-release | awk -F\= ' {gsub(/"/,"",$2);print $2}' ) "
38
38
# Special var for rhel like distros to removed point in number e.g 8.4 to just 8.
39
- distroversionrh=" $( printf " %.0f\n " " ${distroversion} " ) "
39
+ distroversionrh=" $( sed -nr ' s/^VERSION_ID="([0-9]*).+?"/\1/p ' /etc/os-release ) "
40
40
distroid=" $( grep " ID=" /etc/os-release | grep -v _ID | awk -F\= ' {gsub(/"/,"",$2);print $2}' ) "
41
41
distroidlike=" $( grep " ID_LIKE=" /etc/os-release | grep -v _ID | awk -F\= ' {gsub(/"/,"",$2);print $2}' ) "
42
42
distrocodename=" $( grep " VERSION_CODENAME" /etc/os-release | awk -F\= ' {gsub(/"/,"",$2);print $2}' ) "
You can’t perform that action at this time.
0 commit comments