2006-01-06 Robert Love <rml@novell.com>
Patch by Timo Hoenig <thoenig@suse.de>: * src/NetworkManagerSystem.h, src/nm-dbus-nm.c: Add interfaces to hangup specific dialup devices. * src/backends/NetworkManagerDebian.c, src/backends/NetworkManagerGentoo.c, src/backends/NetworkManagerRedHat.c, src/backends/NetworkManagerSlackware.c: Add stub backend. * src/backends/NetworkManagerRedHat.c, src/backends/NetworkManagerSuSE.c: Add specific backend interface to hangup specific dialup devices. git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@1272 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
This commit is contained in:
@@ -653,6 +653,30 @@ void nm_system_deactivate_all_dialup (GSList *list)
|
||||
}
|
||||
}
|
||||
|
||||
gboolean nm_system_deactivate_dialup (GSList *list, const char *dialup)
|
||||
{
|
||||
GSList *elt;
|
||||
gboolean ret = FALSE;
|
||||
|
||||
for (elt = list; elt; elt = g_slist_next (elt))
|
||||
{
|
||||
NMDialUpConfig *config = (NMDialUpConfig *) elt->data;
|
||||
if (strcmp (dialup, config->name) == 0)
|
||||
{
|
||||
char *cmd;
|
||||
|
||||
nm_info ("Deactivating dialup device %s (%s) ...", dialup, (char *) config->data);
|
||||
cmd = g_strdup_printf ("/sbin/ifdown %s", (char *) config->data);
|
||||
nm_spawn_process (cmd);
|
||||
g_free (cmd);
|
||||
ret = TRUE;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
gboolean nm_system_activate_dialup (GSList *list, const char *dialup)
|
||||
{
|
||||
GSList *elt;
|
||||
|
Reference in New Issue
Block a user