Current-Users archive

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

Re: backslashes in ifconfig.xxN



On Sun, 12 Sep 2010, Hauke Fath wrote:
> after upgrading a netbsd-4 /etc to -current, I find that /etc/rc.d/network
> trips over the
> 
> ! /sbin/pppoectl ${int} \
>         myauthproto=pap \
>         'myauthname=foo' \
>         'myauthsecret=bar' \
>         hisauthproto=none \
>         max-auth-failure=5
> 
> section in my /etc/ifconfig.pppoe0, complaining about the backslashes. I
> see that -current "network" uses
> 
> "!"*)
>       ( eval "${args#*!}" )
> 
> vs. the netbsd-4
> 
> "!"*)
>       eval ${args#*!}
> 
> ifconfig.if(5) has nothing about backslashes. Is this issue known/to be
> expected/intentional/documented?

The documentation says nothing about backslashes, but old versions
of the code interpreted backslashes and quotes multiple times
before invoking the command.  I "fixed" what I saw as incorrect and
undocumented additional levels of parsing, by using "read -r" instead
of just "read", and by careful quoting.  However, I was thinking only
of embedded backslashes and quotes, not <backslash><newline> sequences,
and it's a bug that <backslash><newline> is not handled in the way you
expect.  I will work on fixing it.

--apb (Alan Barrett)


Home | Main Index | Thread Index | Old Index