From 8bea235d3ff0c488a1b4e931ab8a9b1261fe0f5f Mon Sep 17 00:00:00 2001 From: Michael Howe Date: Sat, 9 Dec 2017 12:24:15 +0000 Subject: [PATCH] Fix regex in check_configtool, release non-test version The regex wasn't anchored, so wasn't being very helpful. --- debian/changelog | 6 ++++-- plugins/check_configtool | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/debian/changelog b/debian/changelog index 7bd471b..e72efa8 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,11 +1,13 @@ -nagios-plugins-local (0.15~test.1) UNRELEASED; urgency=medium +nagios-plugins-local (0.15) unstable; urgency=medium * check_md_raid: - strip trailing spaces from mdadm state * nagios-plugins-local-client: - new plugin: check_monit + * check_configtool: + - fix regex looking for configtool cronjobs - -- Michael Howe Wed, 06 Sep 2017 19:00:00 +0100 + -- Michael Howe Sat, 09 Dec 2017 12:23:39 +0000 nagios-plugins-local (0.14) unstable; urgency=low diff --git a/plugins/check_configtool b/plugins/check_configtool index 76a9ffe..1e5a3a2 100755 --- a/plugins/check_configtool +++ b/plugins/check_configtool @@ -37,7 +37,7 @@ unless( -d $config->repository ){ my $cronjob_exists = 0; CRONTABS: foreach my $file ( glob '/etc/cron.d/*' ){ # letters, digits, underscores and hyphens, per cron(8) - next unless $file =~ m{[a-z0-9_-]+}i; + next unless $file =~ m{^[a-z0-9_-]+$}i; open( my $fh, "<", $file ) or die "Could not open $file for reading: $!"; while( my $line = <$fh> ){ -- 2.39.5