Hylafax Mailing List Archives

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

mawk bugs (?) in xferstats and faxcron




Hello all,
	I'm using the HylaFAX v4.0pl1 binary distribution under Linux (2.0.29).
Ever since installing it I've had problems with faxcron and xferstats, they
never showed the right things (from the etc/xferlog file). I got around
to looking at it today and found that the problem is in the calculation
of cvtDateTime in the two scripts. They both have code like the following

	mon = substr(s,0,2) + 0;

and then loop to calculate the number of days up to the start of the
month in question. However this always returns 0 as awk strings start
at 1. I'm no awk expert, I don't know if this is mawk's fault or some
compatability issue. The solution is to change the 0 to 1

	mon = substr(s,1,2) + 0;

My version of mawk is 1.2.2 (a RedHat RPM).  Maybe there are other spots 
where the same construct is causing problems?

Also, in faxcron I had to change

	find log -mtime +$AGELOG -print >$JUNK
to
	find log -mtime +$AGELOG -type f -print >$JUNK

because the original kept trying to remove the log directory.

I don't subscribe to this list so please also email any comments/replies.

Thanks

Warwick

/****** PGPfingerprint 88 18 A5 E6 9A B2 C2 24  80 1D BD 84 57 CB 73 AB ******/
Warwick Allan Heath, Unix & Comms	RCC IRC d.o.o., Ulica XIV. divizije 14,
Mail: warwick@rcc-irc.si		3000 Celje, SLOVENIJA
Web: http://www.rcc-irc.si/		Tel: +386 63 441 144 x251 Fax: 442 036



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