changeset 415:de6f43c2df66

Fix the "needs updating" regex Previously we only got the longest one, because the output is padded at the end with whitespace
author IBBoard <dev@ibboard.co.uk>
date Sat, 08 Oct 2022 12:19:23 +0100
parents 23eac935cffa
children b185498177ef
files manifests/templates.pp
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/manifests/templates.pp	Sat Oct 08 12:18:44 2022 +0100
+++ b/manifests/templates.pp	Sat Oct 08 12:19:23 2022 +0100
@@ -923,7 +923,7 @@
 	}
 	# Notify of available updates
 	cron { 'check-yum-updates':
-		command => '/usr/bin/yum check-update | grep -E "^[^ ]+ +[0-9a-z_:\.\+-]+ +[^ ]+ *$"',
+		command => '/usr/bin/yum check-update | grep -E "^[^ ]+ +[0-9a-z:_\.-]+ +[^ ]+\s*\$"',
 		hour => '4',
 		minute => '30',
 		weekday => '0-6/3', #Sunday, Wednesday and Saturday morning