HylaFAX The world's most advanced open source fax server

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: [hylafax-users] FaxDispatch + MSN Problem



* Kevin <kevin@xxxxxxxxxx> [070412 09:21]:

> if [ "$7" != "" ]; then
> PHONEMATCH=$7\$
> USERENTRY=`grep -v "^#" etc/users | grep "$PHONEMATCH"`
> if [ "$USERENTRY" != "" ]; then
> USERNAME=`echo $USERENTRY | awk '{print $1}'`
> SENDTO="$USERNAME"
> fi
> fi
> --------------------------------------------------------------------------------

$7 won't exist, because the the faxrcvd uses shift:
 
> FILE="$1"; shift;
> DEVICE="$1"; shift;
> COMMID="$1"; shift;
> MSG="$1"; shift;
> COUNT=1
> while [ $# -ge 1 ]; do
>	# The eval has $1 set yet, and this forces a variable-to-variable
>	# assignment, allowing us to not need to do escaping
>	eval CALLID$COUNT='$1'
>	shift
>	COUNT=`expr $COUNT + 1`
> done
> 
> CIDNUMBER="$CALLID1"
> CIDNAME="$CALLID2"

You really want to be using $CALLID<X> (where X might to be 3 in
your case?).

a.

-- 
Aidan Van Dyk                                             aidan@xxxxxxxx
Senior Software Developer                          +1 215 825-8700 x8103
iFAX Solutions, Inc.                                http://www.ifax.com/

Attachment: signature.asc
Description: Digital signature




Project hosted by iFAX Solutions