2006-05-16 Robert Love <rml@novell.com>
* src/backends/NetworkManagerSuSE.c: Don't touch ypbind or autofs unless dhcp:DHCLIENT_MODIFY_NIS_CONF is set to "yes". git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@1737 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
This commit is contained in:
@@ -1,3 +1,8 @@
|
|||||||
|
2006-05-16 Robert Love <rml@novell.com>
|
||||||
|
|
||||||
|
* src/backends/NetworkManagerSuSE.c: Don't touch ypbind or autofs unless
|
||||||
|
dhcp:DHCLIENT_MODIFY_NIS_CONF is set to "yes".
|
||||||
|
|
||||||
2006-05-13 Dan Williams <dcbw@redhat.com>
|
2006-05-13 Dan Williams <dcbw@redhat.com>
|
||||||
|
|
||||||
* src/nm-device-802-3-ethernet.c
|
* src/nm-device-802-3-ethernet.c
|
||||||
|
@@ -1089,8 +1089,7 @@ void nm_system_activate_nis (NMIP4Config *config)
|
|||||||
{
|
{
|
||||||
shvarFile *file;
|
shvarFile *file;
|
||||||
const char *nis_domain;
|
const char *nis_domain;
|
||||||
char *name, *buf = NULL;
|
char *name, *buf;
|
||||||
int num_nis_servers = 0;
|
|
||||||
struct in_addr temp_addr;
|
struct in_addr temp_addr;
|
||||||
int i;
|
int i;
|
||||||
FILE *ypconf = NULL;
|
FILE *ypconf = NULL;
|
||||||
@@ -1117,12 +1116,15 @@ void nm_system_activate_nis (NMIP4Config *config)
|
|||||||
goto out_close;
|
goto out_close;
|
||||||
|
|
||||||
if (!strcmp (buf, "yes")) {
|
if (!strcmp (buf, "yes")) {
|
||||||
|
int num_nis_servers;
|
||||||
|
|
||||||
num_nis_servers = nm_ip4_config_get_num_nis_servers(config);
|
num_nis_servers = nm_ip4_config_get_num_nis_servers(config);
|
||||||
/* write out yp.conf and restart the daemon */
|
|
||||||
if (num_nis_servers > 0)
|
if (num_nis_servers > 0)
|
||||||
{
|
{
|
||||||
struct stat sb;
|
struct stat sb;
|
||||||
|
|
||||||
|
/* write out yp.conf and restart the daemon */
|
||||||
|
|
||||||
ypconf = fopen ("/etc/yp.conf", "w");
|
ypconf = fopen ("/etc/yp.conf", "w");
|
||||||
|
|
||||||
if (ypconf)
|
if (ypconf)
|
||||||
@@ -1166,20 +1168,42 @@ out_gfree:
|
|||||||
*/
|
*/
|
||||||
void nm_system_shutdown_nis (void)
|
void nm_system_shutdown_nis (void)
|
||||||
{
|
{
|
||||||
struct stat sb;
|
char *name, *buf = NULL;
|
||||||
|
shvarFile *file;
|
||||||
|
|
||||||
if (stat ("/usr/sbin/rcypbind", &sb) != -1)
|
name = g_strdup_printf (SYSCONFDIR"/sysconfig/network/dhcp");
|
||||||
{
|
file = svNewFile (name);
|
||||||
nm_info ("Stopping ypbind.");
|
if (!file)
|
||||||
nm_spawn_process ("/usr/sbin/rcypbind stop");
|
goto out_gfree;
|
||||||
}
|
|
||||||
if (stat ("/usr/sbin/rcautofs", &sb) != -1)
|
buf = svGetValue (file, "DHCLIENT_MODIFY_NIS_CONF");
|
||||||
{
|
if (!buf)
|
||||||
nm_info ("Restarting autofs.");
|
goto out_close;
|
||||||
nm_spawn_process ("/usr/sbin/rcautofs restart");
|
|
||||||
|
if (!strcmp (buf, "yes")) {
|
||||||
|
struct stat sb;
|
||||||
|
|
||||||
|
if (stat ("/usr/sbin/rcypbind", &sb) != -1)
|
||||||
|
{
|
||||||
|
nm_info ("Stopping ypbind.");
|
||||||
|
nm_spawn_process ("/usr/sbin/rcypbind stop");
|
||||||
|
}
|
||||||
|
|
||||||
|
if (stat ("/usr/sbin/rcautofs", &sb) != -1)
|
||||||
|
{
|
||||||
|
nm_info ("Restarting autofs.");
|
||||||
|
nm_spawn_process ("/usr/sbin/rcautofs restart");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
free (buf);
|
||||||
|
out_close:
|
||||||
|
svCloseFile (file);
|
||||||
|
out_gfree:
|
||||||
|
g_free (name);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* nm_system_set_hostname
|
* nm_system_set_hostname
|
||||||
*
|
*
|
||||||
|
Reference in New Issue
Block a user