The ifup-routes script from initscripts-8.07-1 fails to ignore comment lines in "route-<interface>" files, and chokes if a mix of old and new syntax is in use. If any "ADDRESSn" lines are found in the file, despite being commented out, ifup-routes will assume "newer" syntax is in use and feed it to handle_file. The handle_file function sources the file, which in effect ignores comments, and will then fail if any uncommented "older" syntax lines are present (they will get treated as commands instead of arguments to "/sbin/ip route add"). Once the test for syntax version is fixed to ignore comments, the parsing of the "older" syntax needs to be modified in a similar fashion; otherwise it will attempt to pass stuff like "#ADDRESS0=1.2.3.4" as arguments to "/sbin/ip route add" (which will obviously fail, noisily). This is a superset of the problem described in Bug #114548.
Created attachment 112932 [details] route-eth0 that tickles both of the poor comment handling bits of ifup-routes.
Created attachment 112933 [details] Ignore comments in route-eth0 files. The attached patch makes syntax version detection ignore commented lines, and ditto for the parsing of "older" syntax files. These are strictly separate issues, but since the patch is all of 20 lines including context... :-)
Created attachment 112992 [details] a better patch I'm committing this; it looks simpler and calls less commands.
Erm, *fewer* commands. *whack*
Will be in 8.08-1.
Created attachment 113021 [details] Modified patch to ignore comments and blank lines. Patch #112992 will emit RTNETLINK errors for blank lines, and the ${line##\#} syntax just makes my head hurt. This modified patch makes the test also ignore blank lines and uses better grokkable (regex match) test logic. Note that the patch is against 8.07-1 since 8.08-1 hasn't hit my mirrors yet.
Created attachment 113024 [details] Modified patch to ignore comments and blank lines. *sigh* And of course I had to leave a leftover "echo" in there. :-(
Thanks, added. Will still be in 8.08-1. :)
*** Bug 81821 has been marked as a duplicate of this bug. ***