Quoting Radu Spineanu ([EMAIL PROTECTED]):
> Zoran Dzelajlija wrote:
> > 
> > Hi, IFS=$'\n' does not work as expected if /bin/sh points
> > to dash or posh.  "n" is used as a separator instead and
> > arguments to flow-capture are generated incorrectly, so
> > invoke-rc.d flow-tools start fails (and postinst fails
> > trying to start it).
> 
> Does it work if you remove the $ from IFS ?
> Something like IFS='\n' ?

No, setting the variable to '\n' makes the init script fail
if /bin/sh is dash, posh or bash regardless.  There is no
backslash-character expansion in variable assignment.  Eg.

$ a='\n'
$ /bin/echo "$a"
\n
$

So, there is no reason why it should work.  The original works because bash
has the feature of expanding backslash-character stuff inside $'', and some
other shells which are a valid choice for /bin/sh do not have this feature. 
Hence, it is a bashism.

> It seems to be ok here.

This is strange, I'm pretty sure it should have failed if you had installed
posh and did "ln -sf posh /bin/sh".  Does your flow-capture.conf line
contain any "n" characters?  Mine is:

-V 5 -p /var/run/flow-tools/flow-capture -N 0 -w /home/netflow -n 288 -E 2G 
0/161.53.1.1/5000

Regards,
Zoran


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to