[Pkg-utopia-commits] r927 - in
packages/unstable/networkmanager/debian: . patches
Michael Biebl
mbiebl-guest at costa.debian.org
Sat Aug 12 15:37:12 UTC 2006
Author: mbiebl-guest
Date: 2006-08-12 15:37:12 +0000 (Sat, 12 Aug 2006)
New Revision: 927
Modified:
packages/unstable/networkmanager/debian/README.Debian
packages/unstable/networkmanager/debian/patches/05-debian_backend.patch
Log:
Improve the dial-up configuration handling:
- Display the provider name instead of a cryptic number
- Check the return value of ifupdown
- Add a new section to README.Debian about how to set up a dial-up connection
Modified: packages/unstable/networkmanager/debian/README.Debian
===================================================================
--- packages/unstable/networkmanager/debian/README.Debian 2006-08-10 20:00:43 UTC (rev 926)
+++ packages/unstable/networkmanager/debian/README.Debian 2006-08-12 15:37:12 UTC (rev 927)
@@ -10,8 +10,8 @@
"adduser username netdev" or one of the graphical user management frontends.
After that you have to reload D-Bus with the command "/etc/init.d/dbus reload".
-Configuration
-~~~~~~~~~~~~~
+Configuration of wireless and ethernet interfaces
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Only devices that are *not* listed in /etc/network/interfaces or which have
been configured "auto" and "dhcp" (with no other options) are managed by NM.
@@ -51,3 +51,19 @@
5.)
Device is not listed in /etc/network/interfaces.
-> Device is managed by NM.
+
+Dial-up configuration
+~~~~~~~~~~~~~~~~~~~~~
+After configuring your PPP interface (either manually or by using a tool like
+"pppconfig") to work with a peer called "myisp" you should edit
+/etc/network/interfaces and add a stanza like this:
+
+iface ppp0 inet ppp
+ provider myisp
+
+NM will then make it possible to dial this connection.
+If you want to set up multiple internet service providers simply create a new
+stanza as listed above specifying the provider and a different iface, e.g. ppp1.
+
+Please read the "Debian Reference Manual", section 10.6.1.4 or the "interfaces"
+man page for further information.
Modified: packages/unstable/networkmanager/debian/patches/05-debian_backend.patch
===================================================================
--- packages/unstable/networkmanager/debian/patches/05-debian_backend.patch 2006-08-10 20:00:43 UTC (rev 926)
+++ packages/unstable/networkmanager/debian/patches/05-debian_backend.patch 2006-08-12 15:37:12 UTC (rev 927)
@@ -1,5 +1,5 @@
diff --git a/src/backends/NetworkManagerDebian.c b/src/backends/NetworkManagerDebian.c
-index 740572a..8090696 100644
+index 740572a..3a2fdd6 100644
--- a/src/backends/NetworkManagerDebian.c
+++ b/src/backends/NetworkManagerDebian.c
@@ -37,6 +37,7 @@ #include "interface_parser.h"
@@ -74,7 +74,95 @@
}
-@@ -679,7 +727,10 @@ void nm_system_set_hostname (NMIP4Config
+@@ -563,12 +611,18 @@ gboolean nm_system_deactivate_dialup (GS
+ if (strcmp (dialup, config->name) == 0)
+ {
+ char *cmd;
++ int status;
+
+ 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;
++ if (status == 0) {
++ ret = TRUE;
++ } else {
++ nm_warning ("Couldn't deactivate dialup device %s (%s) - %d", dialup, (char *) config->data, status);
++ ret = FALSE;
++ }
+ break;
+ }
+ }
+@@ -587,12 +641,18 @@ gboolean nm_system_activate_dialup (GSLi
+ if (strcmp (dialup, config->name) == 0)
+ {
+ char *cmd;
++ int status;
+
+ nm_info ("Activating dialup device %s (%s) ...", dialup, (char *) config->data);
+ cmd = g_strdup_printf ("/sbin/ifup %s", (char *) config->data);
+ nm_spawn_process (cmd);
+ g_free (cmd);
+- ret = TRUE;
++ if (status == 0) {
++ ret = TRUE;
++ } else {
++ nm_warning ("Couldn't activate dialup device %s (%s) - %d", dialup, (char *) config->data, status);
++ ret = FALSE;
++ }
+ break;
+ }
+ }
+@@ -603,23 +663,26 @@ gboolean nm_system_activate_dialup (GSLi
+ GSList * nm_system_get_dialup_config (void)
+ {
+ const char *buf;
+- unsigned int i = 0;
++ const char *provider;
+ GSList *list = NULL;
+ if_block *curr;
+ ifparser_init();
+
+ /* FIXME: get all ppp(and others?) lines from /e/n/i here */
+ curr = ifparser_getfirst();
+- while(curr!=NULL)
++ while (curr != NULL)
+ {
+ NMDialUpConfig *config;
+- if (strcmp(curr->type,"iface")==0)
++ if (strcmp(curr->type, "iface") == 0)
+ {
+- buf = ifparser_getkey(curr,"inet");
+- if (buf && strcmp (buf, "ppp")==0)
++ buf = ifparser_getkey(curr, "inet");
++ if (buf && strcmp (buf, "ppp") == 0)
+ {
++ provider = ifparser_getkey(curr, "provider");
++ if (!provider)
++ provider = "default provider";
+ config = g_malloc (sizeof (NMDialUpConfig));
+- config->name = g_strdup_printf ("Modem (#%d)", i++);
++ config->name = g_strdup_printf ("%s via Modem", provider);
+ config->data = g_strdup (curr->name); /* interface name */
+
+ list = g_slist_append (list, config);
+@@ -631,14 +694,6 @@ GSList * nm_system_get_dialup_config (vo
+ }
+ ifparser_destroy();
+
+- /* Hack: Go back and remove the "(#0)" if there is only one device */
+- if (i == 1)
+- {
+- NMDialUpConfig *config = (NMDialUpConfig *) list->data;
+- g_free (config->name);
+- config->name = g_strdup ("Modem");
+- }
+-
+ return list;
+ }
+
+@@ -679,7 +734,10 @@ void nm_system_set_hostname (NMIP4Config
*/
gboolean nm_system_should_modify_resolv_conf (void)
{
More information about the Pkg-utopia-commits
mailing list