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] Missing failure notification.



Jean-Pierre Radley wrote:

A mysterious error, since the shell grammar sure looks OK to me:

jpradley:boss 392% bin/notify 'doneq/q1233' 'failed' '1:15'
bin/notify: syntax error at line 617: `done' unexpected



Ah, well, done is a keyword in sh, and so I can conceivably understand why this...


case "$WHY" in
done)
notify_mail "$jobtag $DICTTO $DESTINATION $DICTCOMPLETED" "$mailaddr";;
failed)


... could be a problem. If you're into investigating this, put double-quotes around that "done" and see how it goes with sh once again.

I have convinced myself that there is a problem with /bin/sh
in my OS, and have bug-reported it.



Well, I have no argument that sh should understand that, in this context, done cannot be a keyword. That said, being portable is still important.


I edited the first line of bin/notify:

s/sh/ksh

and the notification occured as expected.

Which leads to this question: why does the template for 'notify' have
/bin/sh hardcoded, instead of using

SCRIPT_SH="/bin/ksh"

that I had explicitly set in config.site?


It's a long-standing HylaFAX oversight. I've fixed it now, and it will be in the next release.


Thanks,

Lee.


____________________ HylaFAX(tm) Users Mailing List _______________________ To subscribe/unsubscribe, click http://lists.hylafax.org/cgi-bin/lsg2.cgi On UNIX: mail -s unsubscribe hylafax-users-request@xxxxxxxxxxx < /dev/null *To learn about commercial HylaFAX(tm) support, mail sales@xxxxxxxxx*




Project hosted by iFAX Solutions