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
Index: networking/ifupdown.c
===================================================================
--- networking/ifupdown.c       (revision 22672)
+++ networking/ifupdown.c       (working copy)
@@ -711,7 +711,7 @@
 #endif
                rest_of_line = buf;
                first_word = next_word(&rest_of_line);
-               if (!first_word || *buf == '#') {
+               if (!first_word || *first_word == '#' ) {
                        free(buf);
                        continue; /* blank/comment line */
                }
_______________________________________________
busybox mailing list
busybox@busybox.net
http://busybox.net/cgi-bin/mailman/listinfo/busybox

Reply via email to