Hylafax Mailing List Archives

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

[hylafax-users] awk bug in bin/notify



Hi there.

I am running HylaFax 4.2.1-1 (the current version from Debian Testing). 
I had some problems with the notify script sending confirmations to the 
wrong address -- basically the confirmations would be sent to a blank 
address and would bounce back to my FaxMaster account.

After some investigation, I found that the bin/notify script was failing 
with an awk error, specifically this:

awk: line 37: regular expression compile failed (missing operand)

So I did some searching and found HylaFax Bug 412 
(http://bugs.hylafax.org/bugzilla/show_bug.cgi?id=412), which is a 
similar awk problem. I played with the notify script a little and came up with 
this patch to fix the problem:


--- bin/notify-20050215.andybackup      2005-02-15 19:08:57.000000000 -0500
+++ bin/notify  2005-02-15 19:09:17.000000000 -0500
@@ -205,7 +205,7 @@
                   sub(/\\\\$/, "\\\\n", status);
                   while (getline > 0) {
                   status = status $0;
-                  gsub("*","",status);
+                  gsub(/\*/,"",status);
                   sub(/\\\\$/, "\\\\n", status);
                   if ($0 !~ /\\\\$/)
                       break;


Basically the problem is the same as in Bug 412: awk expects a regexp in argument 
1 of gsub, and it doesn't like the bare "*". I replaced it with the same fix from 
the bug.

By the way, I'm using mawk 1.3.3-11.

If anyone finds this useful, please feel free to use it. If I somehow screwed up 
my notify script to make it stop working, and I'm the only one to find this patch 
useful, then so be it. :-)

Thanks,

Andy MacNamara

____________________ 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*



Home
Report any problems to webmaster@hylafax.org

HylaFAX is a trademark of Silicon Graphics Corporation.
Internet connectivity for hylafax.org is provided by:
VirtuALL Private Host Services