Skip to content

Commit 7bd6725

Browse files
committed
Fixing issue where on RHEL 8 systems the update history was not being reported back
1 parent 4832333 commit 7bd6725

1 file changed

Lines changed: 7 additions & 2 deletions

File tree

files/bash/update_rh.sh

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,9 @@ else
101101
# Installed <package> <repo>
102102
# example:
103103
# Installed rpm-4.11.3-35.el7.x86_64 @base
104-
LAST_INSTALL=$(echo "$YUM_HISTORY" | grep "Installed\|Dep-Install")
104+
# example RHEL 8:
105+
# Install rpm-4.11.3-35.el7.x86_64 @base
106+
LAST_INSTALL=$(echo "$YUM_HISTORY" | grep "Install\|Installed\|Dep-Install")
105107
tee -a "${RESULT_FILE}" <<EOF
106108
{
107109
"installed": [
@@ -145,7 +147,10 @@ EOF
145147
# Example:
146148
# Updated puppet-bolt-1.25.0-1.el7.x86_64 @puppet6
147149
# Update 1.26.0-1.el7.x86_64 @puppet6
148-
LAST_UPGRADE=$(echo "$YUM_HISTORY" | grep "Updated \| Update ")
150+
# Example RHEL 8:
151+
# Upgrade st2-3.6.0-3.x86_64 @StackStorm_stable
152+
# Upgraded st2-3.5.0-1.x86_64 @@System
153+
LAST_UPGRADE=$(echo "$YUM_HISTORY" | grep "Upgraded \| Upgrade \| Updated \| Update ")
149154
tee -a "${RESULT_FILE}" <<EOF
150155
"upgraded": [
151156
EOF

0 commit comments

Comments
 (0)