X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=src%2Fsrc%2Fexiwhat.src;h=2542b01984789671a446a970a497392c80268ce9;hb=5a886ce7f82d5add6fdbf17a6ed698f13abb748d;hp=77d7f16b96cde4bb80432f8cf56a114c2b2633c0;hpb=059ec3d9952740285fb1ebf47961b8aca2eb1b4a;p=user%2Fhenk%2Fcode%2Fexim.git diff --git a/src/src/exiwhat.src b/src/src/exiwhat.src index 77d7f16b9..2542b0198 100644 --- a/src/src/exiwhat.src +++ b/src/src/exiwhat.src @@ -1,7 +1,6 @@ #! /bin/sh -# $Cambridge: exim/src/src/exiwhat.src,v 1.1 2004/10/07 10:39:01 ph10 Exp $ -# Copyright (c) 2003 University of Cambridge. +# Copyright (c) University of Cambridge, 1995 - 2007 # See the file NOTICE for conditions of use and distribution. # Except when they appear in comments, the following placeholders in this @@ -75,6 +74,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 @@ -109,7 +114,7 @@ fi # Solaris, "killall" kills ALL processes - this is the System V version of this # command, and not what we want! -if [ "$multikill_cmd" != "" ] ; then +if [ "$multikill_cmd" != "" ] && type "$multikill_cmd" >/dev/null 2>&1; then $multikill_cmd $signal "$multikill_arg" # No multikill command; do it the hard way @@ -124,7 +129,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 sort -nu ${log} ; fi # End of exiwhat