mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-02-03 13:40:39 +01:00
2005-12-16 Robert Love <rml@novell.com>
* src/backends/NetworkManagerSuSE.c: Do not invoke ypbind or autofs binaries unless they exist (nm_spawn_process() emits a warning if asked to spawn a non-existant process). git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@1205 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
This commit is contained in:
parent
4682733535
commit
ff340cf167
2 changed files with 31 additions and 8 deletions
|
|
@ -1,3 +1,9 @@
|
|||
2005-12-16 Robert Love <rml@novell.com>
|
||||
|
||||
* src/backends/NetworkManagerSuSE.c: Do not invoke ypbind or autofs
|
||||
binaries unless they exist (nm_spawn_process() emits a warning if
|
||||
asked to spawn a non-existant process).
|
||||
|
||||
2005-12-16 Dan Williams <dcbw@redhat.com>
|
||||
|
||||
* gnome/applet/applet-dbus-info.c
|
||||
|
|
|
|||
|
|
@ -849,6 +849,8 @@ void nm_system_activate_nis (NMIP4Config *config)
|
|||
/* write out yp.conf and restart the daemon */
|
||||
if (num_nis_servers > 0)
|
||||
{
|
||||
struct stat sb;
|
||||
|
||||
ypconf = fopen ("/etc/yp.conf", "w");
|
||||
|
||||
if (ypconf)
|
||||
|
|
@ -862,10 +864,17 @@ void nm_system_activate_nis (NMIP4Config *config)
|
|||
fclose (ypconf);
|
||||
} else
|
||||
nm_warning ("Could not commit NIS changes to /etc/yp.conf.");
|
||||
nm_info ("Restarting ypbind.");
|
||||
nm_spawn_process ("/usr/sbin/rcypbind restart");
|
||||
nm_info ("Restarting autofs.");
|
||||
nm_spawn_process ("/usr/sbin/rcautofs restart");
|
||||
|
||||
if (stat ("/usr/sbin/rcypbind", &sb) != -1)
|
||||
{
|
||||
nm_info ("Restarting ypbind.");
|
||||
nm_spawn_process ("/usr/sbin/rcypbind restart");
|
||||
}
|
||||
if (stat ("/usr/sbin/rcautofs", &sb) != -1)
|
||||
{
|
||||
nm_info ("Restarting autofs.");
|
||||
nm_spawn_process ("/usr/sbin/rcautofs restart");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -878,8 +887,16 @@ void nm_system_activate_nis (NMIP4Config *config)
|
|||
*/
|
||||
void nm_system_shutdown_nis (void)
|
||||
{
|
||||
nm_info ("Stopping ypbind.");
|
||||
nm_spawn_process ("/usr/sbin/rcypbind stop");
|
||||
nm_info ("Restarting autofs.");
|
||||
nm_spawn_process ("/usr/sbin/rcautofs restart");
|
||||
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");
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue