diff --git a/scripts/pp b/scripts/pp index c55d0f2db..2fece7068 100755 --- a/scripts/pp +++ b/scripts/pp @@ -1,6 +1,6 @@ #!/bin/sh # Copyright 2020 One Identity LLC. ALL RIGHTS RESERVED -pp_revision="20200506" +pp_revision="20200624" # Copyright 2018 One Identity LLC. ALL RIGHTS RESERVED. # # Redistribution and use in source and binary forms, with or without @@ -5562,12 +5562,11 @@ pp_rpm_detect_distro () { /^Fedora release/ { print "f" $3; exit; } ' /etc/fedora-release` elif test -f /etc/redhat-release; then - pp_rpm_distro=`awk ' - /^Red Hat Enterprise Linux/ { print "rhel" $7; exit; } - /^CentOS release/ { print "centos" $3; exit; } - /^CentOS Linux release/ { print "centos" $4; exit; } - /^Red Hat Linux release/ { print "rh" $5; exit; } - ' /etc/redhat-release` + pp_rpm_distro=`sed -n \ + -e 's/^Red Hat Linux.*release \([0-9][0-9\.]*\).*/rh\1/p' \ + -e 's/^Red Hat Enterprise Linux.*release \([0-9][0-9\.]*\).*/rhel\1/p' \ + -e 's/^CentOS.*release \([0-9][0-9\.]*\).*/centos\1/p' \ + /etc/redhat-release` elif test -f /etc/SuSE-release; then pp_rpm_distro=`awk ' /^SuSE Linux [0-9]/ { print "suse" $3; exit; }