From b10f2b32c4cfc90f65b31116d7c13a79b82c2789 Mon Sep 17 00:00:00 2001 From: Your Name Date: Thu, 16 Sep 2021 18:50:41 +0200 Subject: [PATCH] M #-: Fallback detection in onesysprep of RHEL/CentOS 6 --- src/usr/sbin/onesysprep | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/usr/sbin/onesysprep b/src/usr/sbin/onesysprep index e70a7bd..dcd0da8 100755 --- a/src/usr/sbin/onesysprep +++ b/src/usr/sbin/onesysprep @@ -492,6 +492,13 @@ syscheck() # shellcheck disable=SC1091 . /etc/os-release _ONE_OS_ID=$(echo "$ID" | tr '[:upper:]' '[:lower:]') + + # check for legacy RHEL/CentOS 6 + elif [ -f /etc/centos-release ]; then + echo 'centos' + elif [ -f /etc/redhat-release ]; then + echo 'rhel' + else _ONE_OS_ID=$(uname | tr '[:upper:]' '[:lower:]') fi