Skip to content

Commit f3ab1d8

Browse files
authored
Merge pull request #266 from jordyb6/fix/versionlock-redhat
fix: Parse versionlocked packages properly for RHEL 8+
2 parents ec2f330 + c532820 commit f3ab1d8

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

files/os_patching_fact_generation.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ case $OSFAMILY in
4646
PKGS=$(echo $PKGS | sed 's/Obsoleting.*//')
4747
SECPKGS=$(yum -q --security check-update 2>/dev/null| grep -E -v "^Security:" | grep -oP '^.*?(?= )')
4848
SECPKGS=$(echo $SECPKGS | sed 's/Obsoleting.*//')
49-
HELDPKGS=$([ -r /etc/yum/pluginconf.d/versionlock.list ] && awk -F':' '/:/ {print $2}' /etc/yum/pluginconf.d/versionlock.list | sed 's/-[0-9].*//')
49+
HELDPKGS=$([ -r /etc/yum/pluginconf.d/versionlock.list ] && awk -F':' '/:/ {print $1}' /etc/yum/pluginconf.d/versionlock.list | sed 's/-[0-9].*//')
5050
;;
5151
Suse)
5252
PKGS=$(zypper --non-interactive --no-abbrev --quiet lu | grep '|' | grep -v '\sRepository' | awk -F'|' '/^[[:alnum:]]/ {print $3}' | sed 's/^\s*\|\s*$//')

0 commit comments

Comments
 (0)