Ответ: [PATCH] indent comments in /etc/network/interfaces
Vladimir Dronnikov
dronnikov at gmail.com
Mon Jul 7 08:36:57 PDT 2008
I think we should at last invent a libbb function for dealing with
parsing of config files. The zillions of config files are based on
#-commented and \-continued lines. Almost all of them require then
line-by-line processing of whitespaces delimited tokens.
We already have got some examples (getopt32, recursiveAction, ...)
which have clearly shown the fruitfullness of such an approach.
Comments?
--
Vladimir
2008/7/7, Natanael Copa <natanael.copa at gmail.com>:
> Hi,
>
> Angry user reported that after upgrade (of my busybox/uclibc based
> distro Alpine) the ifup and ifdown utilites choked on
> his /etc/network/interfaces whenever comments where not on first
> comlumn.
>
> The comment in the code says:
> /* Let's try to be compatible.
> *
> * "man 5 interfaces" says:
> * Lines starting with "#" are ignored. Note that end-of-line
> * comments are NOT supported, comments must be on a line of their
> own.
> * A line may be extended across multiple lines by making
> * the last character a backslash.
> *
> * Seen elsewhere in example config file:
> * A "#" character in the very first column makes the rest of the
> line
> * be ignored. Blank lines are ignored. Lines may be indented
> freely.
> * A "\" character at the very end of the line indicates the next
> line
> * should be treated as a continuation of the current one.
> */
>
>
> User claims that debian's ifup/ifdown have supported indent comments for
> ever.
> "Lines may be indented freely" seems to support that statement.
>
> Attatched patch fixes the issue and should not increase the size.
>
> Please commit to trunk and add to fixes-1.11.0.
>
> Thanks!
>
> -nc
>
More information about the busybox
mailing list