[Firewall] Possible bug in environment script

Sinisa Vujic svujic at gmx.net
Mon Mar 2 22:02:21 CET 2009

Hi all,

I would like to point on possible bug in environment script, more 
precisely how output from 'wc -l' isn't sanitized and this lead to 
erroneous results on quite few places.
Problem jumps to life only if you have an old router with ancient 
coreutils like I do (rh9, kernel 2.4.32), version of wc in this package 
returns result with tab or space (I didn't investigate further) 
prepended to numeric.
My solution is: wc -l |sed -e 's/^[[:space:]]*//; s/[[:space:]]*$//'
Hope it helps someone.


More information about the Firewall mailing list