Import Debian changes 4.89-2+deb9u4
[hcoop/debian/exim4.git] / src / exiqgrep.src
index afecbff..d900e99 100644 (file)
@@ -18,6 +18,7 @@
 # Version 1.2
 
 use strict;
+BEGIN { pop @INC if $INC[-1] eq '.' };
 use Getopt::Std;
 
 # Have this variable point to your exim binary.
@@ -44,6 +45,7 @@ if ($^O eq 'darwin') { # aka MacOS X
 };
 
 getopts('hf:r:y:o:s:C:zxlibRca',\%opt);
+if ($ARGV[0]) { &help; exit;}
 if ($opt{h}) { &help; exit;}
 if ($opt{a}) { $eargs = '-bp'; }
 if ($opt{C} && -e $opt{C} && -f $opt{C} && -R $opt{C}) { $eargs .= ' -C '.$opt{C}; }
@@ -86,7 +88,7 @@ EOF
 }
 
 sub collect() {
-       open(QUEUE,"$exim $eargs |") or die("Error openning pipe: $!\n");
+       open(QUEUE,"$exim $eargs |") or die("Error opening pipe: $!\n");
        while(<QUEUE>) {
                chomp();
                my $line = $_;