diff options
| author | Michael Biebl <biebl@teco.edu> | 2006-08-12 15:37:12 +0000 |
|---|---|---|
| committer | Michael Biebl <biebl@teco.edu> | 2006-08-12 15:37:12 +0000 |
| commit | 911c1f8ef6f9eb7f52f5bdf7c973f8f528549726 (patch) | |
| tree | 2d04339fda22497f33cb38232b963521a648b997 | |
| parent | 0d83a8843f0157a1fba8753d4cef1a10e69e4f8b (diff) | |
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 git-svn-id: svn+ssh://svn.debian.org/svn/pkg-utopia/packages/unstable/networkmanager@927 ceb527fc-18e6-0310-9fe2-813c157c29e7
| -rw-r--r-- | debian/README.Debian | 20 | ||||
| -rw-r--r-- | debian/patches/05-debian_backend.patch | 92 |
2 files changed, 108 insertions, 4 deletions
diff --git a/debian/README.Debian b/debian/README.Debian index 59a789e4..621518cd 100644 --- a/debian/README.Debian +++ b/debian/README.Debian @@ -10,8 +10,8 @@ group "netdev". If you want to add a user to group "netdev" use the command "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 @@ iface eth0 inet static 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. diff --git a/debian/patches/05-debian_backend.patch b/debian/patches/05-debian_backend.patch index 84c7238e..c8006623 100644 --- a/debian/patches/05-debian_backend.patch +++ b/debian/patches/05-debian_backend.patch @@ -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 @@ index 740572a..8090696 100644 } -@@ -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) { |