]> git.pld-linux.org Git - packages/nagios-plugins.git/blob - mawk-workaround.patch
add mp reference
[packages/nagios-plugins.git] / mawk-workaround.patch
1
2 mawk pattern matching is probably too greedy as it fails when two paths on same line:
3
4
5 mawk: run time error: regular expression compile failed (missing operand)
6 /usr/lib/nullmailer' || -d '/usr/local/lib/nullmailer
7         FILENAME="check_mailq.pl" FNR=627 NR=627
8
9
10 this is resolved differently in monitoring-plugins:
11 https://github.com/monitoring-plugins/monitoring-plugins/commit/c08d6a429ba0e0cd3642ba2c2fe85687472ee22f
12
13 --- nagios-plugins-2.0.1/plugins-scripts/check_mailq.pl~        2014-04-21 14:33:35.000000000 +0300
14 +++ nagios-plugins-2.0.1/plugins-scripts/check_mailq.pl 2014-04-21 14:33:37.760719061 +0300
15 @@ -610,17 +610,22 @@
16                 {
17                         $mailq = 'qmail';
18                 }
19 -               elsif (-d '/var/lib/postfix' || -d '/var/local/lib/postfix'
20 -                      || -e '/usr/sbin/postfix' || -e '/usr/local/sbin/postfix')
21 +               elsif (-d '/var/lib/postfix'
22 +                       || -d '/var/local/lib/postfix'
23 +                      || -e '/usr/sbin/postfix'
24 +                          || -e '/usr/local/sbin/postfix')
25                 {
26                         $mailq = 'postfix';
27                 }
28 -               elsif (-d '/usr/lib/exim4' || -d '/usr/local/lib/exim4'
29 -                      || -e '/usr/sbin/exim' || -e '/usr/local/sbin/exim')
30 +               elsif (-d '/usr/lib/exim4'
31 +                       || -d '/usr/local/lib/exim4'
32 +                      || -e '/usr/sbin/exim'
33 +                          || -e '/usr/local/sbin/exim')
34                 {
35                         $mailq = 'exim';
36                 }
37 -               elsif (-d '/usr/lib/nullmailer' || -d '/usr/local/lib/nullmailer'
38 +               elsif (-d '/usr/lib/nullmailer'
39 +                       || -d '/usr/local/lib/nullmailer'
40                        || -e '/usr/sbin/nullmailer-send'
41                        || -e '/usr/local/sbin/nullmailer-send')
42                 {
This page took 0.054598 seconds and 3 git commands to generate.