2004-10-12 Dan Williams <dcbw@redhat.com>

* TODO
		- Remove bit about static IP address support

	* src/NetworkManagerUtils.c
		- (nm_spawn_process): Add some error reporting

	* src/NetworkManagerDevice.c
		- (nm_device_activation_configure_ip): hook up to the static config
			routines in the backends

	* src/backends/NetworkManagerRedHat.c
		- (nm_system_device_update_config_info): use shvar.c routines to
			parse the config file iformation, not our own
		- (nm_system_device_setup_static_ip4_config): new function, based
			heavily on 'ifup' script and 'ipcalc' tool code.  Set up a device
			with a static IP address and gateway

	* src/backends/shvar.[ch]
		- Parser (filched from initscripts package) for ifcfg-* files

	* src/backends/NetworkManagerSystem.h
	  src/backends/NetworkManagerGentoo.c
	  src/backends/NetworkManagerDebian.c
	  src/backends/NetworkManagerSlackware.c
		- Stub nm_system_device_update_config_info() and nm_system_device_setup_static_ip4_config()


git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@212 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
This commit is contained in:
Dan Williams
2004-10-12 11:15:47 +00:00
parent c195cbf841
commit b6df634a51
9 changed files with 286 additions and 66 deletions

View File

@@ -183,18 +183,26 @@ int nm_spawn_process (char *args)
gint num_args;
char **argv;
int exit_status;
GError *error = NULL;
g_return_val_if_fail (args != NULL, -1);
if (g_shell_parse_argv (args, &num_args, &argv, NULL))
{
if (g_spawn_sync ("/", argv, NULL, 0, NULL, NULL, NULL, NULL, &exit_status, NULL))
if (g_spawn_sync ("/", argv, NULL, 0, NULL, NULL, NULL, NULL, &exit_status, &error))
{
g_strfreev (argv);
return (exit_status);
}
else
syslog (LOG_ERR, "nm_spawn_process('%s'): could not spawn process. (%s)\n", args, error->message);
g_strfreev (argv);
if (error)
g_error_free (error);
}
else
syslog (LOG_ERR, "nm_spawn_process('%s'): could not parse arguments (%s)\n", args, error->message);
return (-1);
}