[BusyBox] busybox awk bug (fwd)

Thomas Eckert tom at subbi.uni-freiburg.de
Sat Mar 15 11:13:03 UTC 2003


sorry -- forgot to post to the list.

---------- Forwarded message ----------
From: Thomas Eckert <tom at subbi.uni-freiburg.de>
To: Sid Wade <sid at vivato.net>
Date: Sat, 15 Mar 2003 19:06:56 +0100 (MET)
Subject: RE: [BusyBox] busybox awk bug

On Sat, 15 Mar 2003, Sid Wade wrote:

(...)
> This dog-knot of a problem has come about due to my porting the freeswan
> ipsec package to our product.  For some reason, freeswan has chosen to do
> most of their user-interface/utility functions in shell scripts, and a
> couple of them have embedded awk scripts for
(...)

A few month ago I had exactly the same troubles with freeswan -- if you are
not too short on disk-space: use "mawk", that worked fine for me and it's
small compared to gawk (about 94k dyn-linked against uClibc).

> In any case, the script didn't have an 'exit' at the end of BEGIN - I
> added one just to see what would happen - no change of behavior on
> either RH or my target box, so you are definitely correct about it not
> being a workaround for bb. 

I thought of a different problem: in the special case of _no_ "middle-part"
(no defined actions between BEGIN and END) you get the exit-issue you can
work around with dummy-input.
Changing the freeswan-scripts to work with bb-awk would make upgrading
freeswan painfull -- so I decided to use mawk. My guess is, that the script
uses an gawk-extension or bb-awk has implemented one of the dark-corners of
the language in a different way.
If you really want to dig into this: force gawk on your RH-box to run in
posix-mode by adding "--posix" to the awk-call (thus disabling the GNU
extentions to awk).

> I'll see if I can dig up the book you
> reference, and I've attached the offending script file, if you're
> interested in viewing the miserable thing.

http://www.gnu.org/directory/gawk.html

Have fun and good luck,

	Thomas

-- 
   "If good things lasted forever, would we appreciate how precious they are?"
-Hobbes



More information about the busybox mailing list