Commit Graph

8 Commits

Author SHA1 Message Date
Dan Williams
ba355b6a7e ifupdown: make testcase parsing quiet
Removes messages about invalid ENI formatting when running the
testcases.
2010-08-12 22:44:07 -05:00
Peter Marschall
a5b77939fb ifupdown: make parser for /etc/network/interfaces more robust
The previous implementation of the parser for /etc/network/interfaces had
quite a few drawbacks:
- it expected the lines to be terminated with "\n", even the last line
- it ignored line wraps with "\\" followed by "\n"
- it expected over-long lines to be shorter than 510 characters
- it ignored line wraps on over-long lines
- it treated spaces and tabs differently
- it did not make sure to really tokenize on word boundaries
- it treated the equivalent stanzas "auto" and "allow-auto" differently
- it ignored the fact that the "allow-*" stanzas can take multiple arguments
  that need to be separated to be recognized NetworkManager's processing later
- it allowed "non-block" stanzas to appear before a block

This patch is a rewrite of the parser to fix the issues mentioned:
- it accepts the last line even if it is not terminated by "\n"
- it skips over-long lines, emits a warning and even takes into account
  that over-long lines may be wrapped to next lines
- it un-wraps wrapped lines
- it uses spaces and tabs equivalently to tokenize the input
- it treats "allow-auto" as a synonym to "auto"
- it splits multi-argument "auto"/"allow-*" into multiple
  single-argument stanzas of the same type
- it warns on data stanzas before the first block stanza
2010-08-12 22:41:05 -05:00
Dan Williams
4397f4463a ifupdown: add ifparser testcases
ENI snippets from Peter Marschall <peter@adpm.de>
2010-08-12 22:35:13 -05:00
Dan Williams
e386548132 ifupdown: split parsers into convenience library for easier testcase creation 2010-08-12 18:15:21 -05:00
Dan Williams
c9067d8fed everything: use libgudev instead of HAL; merge NM and nm-system-settings
The only thing that doesn't work yet is the system-settings service's
"auto eth" connections for ethernet devices that don't have an existing
connection.  Might also have issues with unmanaged devices that can't
provide a MAC address until they are brought up, but we'll see.
2009-06-11 00:39:12 -04:00
Dan Williams
3f907cb9e3 License header and FSF address update 2008-12-20 09:46:41 -05:00
Dan Williams
a7949a1230 Fix warning
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@4221 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2008-10-27 00:35:44 +00:00
Dan Williams
8d19530da2 2008-09-18 Dan Williams <dcbw@redhat.com>
Patch from Alexander Sack <asac@ubuntu.com>

	* configure.in
	  system-settings/plugins/Makefile.am
	  system-settings/plugins/ifupdown/Makefile.am
	  system-settings/plugins/ifupdown/interface_parser.c
	  system-settings/plugins/ifupdown/interface_parser.h
	  system-settings/plugins/ifupdown/nm-ifupdown-connection.c
	  system-settings/plugins/ifupdown/nm-ifupdown-connection.h
	  system-settings/plugins/ifupdown/parser.c
	  system-settings/plugins/ifupdown/parser.h
	  system-settings/plugins/ifupdown/plugin.c
	  system-settings/plugins/ifupdown/plugin.h
		- Implement a Debian/Ubuntu legacy network configuration plugin
			(gnome.org #551941)



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@4078 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2008-09-18 15:29:59 +00:00