X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;f=src%2Fsrc%2Fexiwhat.src;h=3af128cf49c54a6cd391b6486644133aeb4d88f2;hb=b2335c0b21d064f660e593112f8c349e48414c9f;hp=4905aa44cb4f82b7e3d13ee4eb846100fe107b12;hpb=079cc20f36c728c7090dd9c70cc415c5f5dabacd;p=exim.git diff --git a/src/src/exiwhat.src b/src/src/exiwhat.src index 4905aa44c..3af128cf4 100644 --- a/src/src/exiwhat.src +++ b/src/src/exiwhat.src @@ -1,5 +1,5 @@ #! /bin/sh -# $Cambridge: exim/src/src/exiwhat.src,v 1.2 2008/04/21 13:13:57 fanf2 Exp $ +# $Cambridge: exim/src/src/exiwhat.src,v 1.4 2009/10/19 11:47:44 nm4 Exp $ # Copyright (c) 2003 University of Cambridge. # See the file NOTICE for conditions of use and distribution. @@ -75,6 +75,12 @@ while [ "$config" = "" -a $# -gt 0 ] ; do shift done +# check we have a config file +if [ "$config" = "" -o ! -f "$config" ]; then + echo Config file not found. + exit 1 +fi + # Determine where the spool directory is. Search for an exim_path setting # in the configure file; otherwise use the bin directory. Call that version of # Exim to find the spool directory. BEWARE: a tab character is needed in the @@ -124,7 +130,7 @@ fi sleep 1 if [ ! -s ${log} ] ; then echo "No exim process data" ; - else sed 's/^[0-9-]* [0-9:]* \([+-][0-9]* \)*//' ${log} | sort -n | uniq ; fi + else sed 's/^[0-9-]* [0-9:]* \([+-][0-9]* \)*\(\[[0-9]\+\] \)\?//' ${log} | sort -n | uniq ; fi # End of exiwhat