2005-10-17 Robert Love <rml@novell.com>

* src/backends/NetworkManagerSuSE.c: use SYSCONFDIR not open-coded
          "/etc"


git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@1027 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
This commit is contained in:
Robert Love
2005-10-17 18:06:10 +00:00
committed by Robert Love
parent 9e577ba84c
commit 2d747adc14
2 changed files with 12 additions and 7 deletions

View File

@@ -1,3 +1,8 @@
2005-10-17 Robert Love <rml@novell.com>
* src/backends/NetworkManagerSuSE.c: use SYSCONFDIR not open-coded
"/etc"
2005-10-17 Christopher Aillon <caillon@redhat.com> 2005-10-17 Christopher Aillon <caillon@redhat.com>
* src/NetworkManagerDevice.c: (process_scan_results) * src/NetworkManagerDevice.c: (process_scan_results)

View File

@@ -264,8 +264,8 @@ void nm_system_kill_all_dhcp_daemons (void)
void nm_system_update_dns (void) void nm_system_update_dns (void)
{ {
#ifdef NM_NO_NAMED #ifdef NM_NO_NAMED
if (nm_spawn_process ("/etc/init.d/nscd status") != 0) if (nm_spawn_process (SYSCONFDIR"/init.d/nscd status") != 0)
nm_spawn_process ("/etc/init.d/nscd restart"); nm_spawn_process (SYSCONFDIR"/init.d/nscd restart");
nm_info ("Clearing nscd hosts cache."); nm_info ("Clearing nscd hosts cache.");
nm_spawn_process ("/usr/sbin/nscd -i hosts"); nm_spawn_process ("/usr/sbin/nscd -i hosts");
@@ -419,6 +419,8 @@ out:
* *
* Read in the config file for a device. * Read in the config file for a device.
* *
* SuSE stores this information in /etc/sysconfig/network/ifcfg-*-<MAC address>
*
*/ */
void *nm_system_device_get_system_config (NMDevice *dev) void *nm_system_device_get_system_config (NMDevice *dev)
{ {
@@ -439,8 +441,6 @@ void *nm_system_device_get_system_config (NMDevice *dev)
g_return_val_if_fail (dev != NULL, NULL); g_return_val_if_fail (dev != NULL, NULL);
/* SuSE stores this information usually in /etc/sysconfig/network/ifcfg-*-<MAC address> */
sys_data = g_malloc0 (sizeof (SuSESystemConfigData)); sys_data = g_malloc0 (sizeof (SuSESystemConfigData));
sys_data->use_dhcp = TRUE; sys_data->use_dhcp = TRUE;
@@ -538,7 +538,7 @@ found:
} }
buf = NULL; buf = NULL;
if ((f = fopen ("/etc/sysconfig/network/routes", "r"))) if ((f = fopen (SYSCONFDIR"/sysconfig/network/routes", "r")))
{ {
while (fgets (buffer, 512, f) && !feof (f)) while (fgets (buffer, 512, f) && !feof (f))
{ {
@@ -716,7 +716,7 @@ static char * verify_and_return_provider (const char *provider)
char *name, *buf = NULL; char *name, *buf = NULL;
int ret; int ret;
name = g_strdup_printf ("/etc/sysconfig/network/providers/%s", provider); name = g_strdup_printf (SYSCONFDIR"/sysconfig/network/providers/%s", provider);
file = svNewFile (name); file = svNewFile (name);
if (!file) if (!file)
@@ -780,7 +780,7 @@ GSList * nm_system_get_dialup_config (void)
continue; continue;
/* open the configuration file */ /* open the configuration file */
name = g_strdup_printf ("/etc/sysconfig/network/%s", dentry); name = g_strdup_printf (SYSCONFDIR"/sysconfig/network/%s", dentry);
modem_file = svNewFile (name); modem_file = svNewFile (name);
if (!modem_file) if (!modem_file)
goto out_gfree; goto out_gfree;