summaryrefslogtreecommitdiffstats
path: root/meta-extras/packages/networkmanager/files
diff options
context:
space:
mode:
Diffstat (limited to 'meta-extras/packages/networkmanager/files')
-rw-r--r--meta-extras/packages/networkmanager/files/70NetworkManagerApplet.shbg4
-rw-r--r--meta-extras/packages/networkmanager/files/99_networkmanager1
-rw-r--r--meta-extras/packages/networkmanager/files/NetworkManager43
-rw-r--r--meta-extras/packages/networkmanager/files/allow-disabling.patch45
-rw-r--r--meta-extras/packages/networkmanager/files/applet-no-animation.patch234
-rw-r--r--meta-extras/packages/networkmanager/files/applet-no-gnome.diff59
-rw-r--r--meta-extras/packages/networkmanager/files/libnlfix.patch29
-rw-r--r--meta-extras/packages/networkmanager/files/makefile-fix.patch17
-rw-r--r--meta-extras/packages/networkmanager/files/nmutil-fix.patch12
-rw-r--r--meta-extras/packages/networkmanager/files/no-restarts.diff21
-rw-r--r--meta-extras/packages/networkmanager/files/no_vpn.patch13
11 files changed, 478 insertions, 0 deletions
diff --git a/meta-extras/packages/networkmanager/files/70NetworkManagerApplet.shbg b/meta-extras/packages/networkmanager/files/70NetworkManagerApplet.shbg
new file mode 100644
index 0000000000..8858b3e7c2
--- /dev/null
+++ b/meta-extras/packages/networkmanager/files/70NetworkManagerApplet.shbg
@@ -0,0 +1,4 @@
+#!/bin/sh
+# Wait for the desktop to say its finished loading
+dbus-wait org.matchbox_project.desktop Loaded
+exec /usr/bin/nm-applet
diff --git a/meta-extras/packages/networkmanager/files/99_networkmanager b/meta-extras/packages/networkmanager/files/99_networkmanager
new file mode 100644
index 0000000000..20cbcc1bca
--- /dev/null
+++ b/meta-extras/packages/networkmanager/files/99_networkmanager
@@ -0,0 +1 @@
+d root root 0700 /var/run/NetworkManager none
diff --git a/meta-extras/packages/networkmanager/files/NetworkManager b/meta-extras/packages/networkmanager/files/NetworkManager
new file mode 100644
index 0000000000..4522e0107b
--- /dev/null
+++ b/meta-extras/packages/networkmanager/files/NetworkManager
@@ -0,0 +1,43 @@
+#!/bin/sh
+#
+### BEGIN INIT INFO
+# Provides: NetworkManager
+# Required-Start: $remote_fs dbus hal
+# Required-Stop: $remote_fs dbus hal
+# Should-Start: $syslog
+# Should-Stop: $syslog
+# Default-Start: 2 3 4 5
+# Default-Stop: 0 1 6
+# Short-Description: network connection manager
+# Description: Daemon for automatically switching network
+# connections to the best available connection.
+### END INIT INFO
+
+. /etc/profile
+
+case $1 in
+ 'start')
+ echo -n "Starting NetworkManager daemon: NetworkManager"
+ /usr/sbin/NetworkManager
+ /usr/sbin/NetworkManagerDispatcher
+ /usr/sbin/wpa_supplicant -u &
+ echo "."
+ ;;
+
+ 'stop')
+ echo -n "Stopping NetworkManager daemon: NetworkManager"
+ kill `ps |grep /usr/sbin/NetworkManagerDispatcher | grep -v grep | cut "-d " -f2`
+ kill `ps |grep /usr/sbin/NetworkManager | grep -v grep | cut "-d " -f2`
+ kill `ps |grep /usr/sbin/wpa_supplicant | grep -v grep | cut "-d " -f2`
+ echo "."
+ ;;
+
+ 'restart')
+ $0 stop
+ $0 start
+ ;;
+
+ *)
+ echo "Usage: $0 { start | stop | restart }"
+ ;;
+esac
diff --git a/meta-extras/packages/networkmanager/files/allow-disabling.patch b/meta-extras/packages/networkmanager/files/allow-disabling.patch
new file mode 100644
index 0000000000..10730e9fe5
--- /dev/null
+++ b/meta-extras/packages/networkmanager/files/allow-disabling.patch
@@ -0,0 +1,45 @@
+Allow interfaces to be ignored by networkmanager by creation of a
+/etc/network/nm-disabled-INTERFACENAME file.
+
+RP - 16/7/2008
+
+Index: trunk/src/backends/NetworkManagerDebian.c
+===================================================================
+--- trunk.orig/src/backends/NetworkManagerDebian.c 2008-07-15 19:23:11.000000000 +0100
++++ trunk/src/backends/NetworkManagerDebian.c 2008-07-15 19:37:05.000000000 +0100
+@@ -29,6 +29,7 @@
+
+ #include <stdio.h>
+ #include <sys/types.h>
++#include <sys/stat.h>
+ #include <signal.h>
+ #include <arpa/inet.h>
+ #include "NetworkManagerGeneric.h"
+@@ -374,12 +375,25 @@
+ /*
+ * nm_system_device_get_disabled
+ *
+- * Return whether the distro-specific system config tells us to use
+- * dhcp for this device.
++ * Return whether the distro-specific system config tells us to interact
++ * with this device.
+ *
+ */
+ gboolean nm_system_device_get_disabled (NMDevice *dev)
+ {
++ struct stat statbuf;
++ gchar *filepath;
++
++ g_return_val_if_fail (dev != NULL, FALSE);
++
++ filepath = g_strdup_printf (SYSCONFDIR"/network/nm-disabled-%s", nm_device_get_iface (dev));
++
++ if (stat(filepath, &statbuf) == 0) {
++ g_free(filepath);
++ return TRUE;
++ }
++
++ g_free(filepath);
+ return FALSE;
+ }
+
diff --git a/meta-extras/packages/networkmanager/files/applet-no-animation.patch b/meta-extras/packages/networkmanager/files/applet-no-animation.patch
new file mode 100644
index 0000000000..d437fd0fc9
--- /dev/null
+++ b/meta-extras/packages/networkmanager/files/applet-no-animation.patch
@@ -0,0 +1,234 @@
+Index: trunk/src/applet.c
+===================================================================
+--- trunk.orig/src/applet.c 2008-02-06 20:30:04.000000000 +0000
++++ trunk/src/applet.c 2008-02-06 20:46:59.000000000 +0000
+@@ -111,8 +111,6 @@
+
+ static void nma_init (NMApplet *applet)
+ {
+- applet->animation_id = 0;
+- applet->animation_step = 0;
+ applet->passphrase_dialog = NULL;
+ applet->icon_theme = NULL;
+ #ifdef ENABLE_NOTIFY
+@@ -1006,20 +1004,6 @@
+ }
+ }
+
+-static gboolean
+-vpn_animation_timeout (gpointer data)
+-{
+- NMApplet *applet = NM_APPLET (data);
+-
+- foo_set_icon (applet, applet->vpn_connecting_icons[applet->animation_step], ICON_LAYER_VPN);
+-
+- applet->animation_step++;
+- if (applet->animation_step >= NUM_VPN_CONNECTING_FRAMES)
+- applet->animation_step = 0;
+-
+- return TRUE;
+-}
+-
+ static void
+ vpn_connection_state_changed (NMVPNConnection *connection,
+ NMVPNConnectionState state,
+@@ -1030,10 +1014,6 @@
+
+ switch (state) {
+ case NM_VPN_CONNECTION_STATE_ACTIVATED:
+- if (applet->animation_id) {
+- g_source_remove (applet->animation_id);
+- applet->animation_id = 0;
+- }
+ foo_set_icon (applet, applet->vpn_lock_icon, ICON_LAYER_VPN);
+ // vpn_connection_info_set_last_attempt_success (info, TRUE);
+ break;
+@@ -1041,10 +1021,7 @@
+ case NM_VPN_CONNECTION_STATE_NEED_AUTH:
+ case NM_VPN_CONNECTION_STATE_CONNECT:
+ case NM_VPN_CONNECTION_STATE_IP_CONFIG_GET:
+- if (applet->animation_id == 0) {
+- applet->animation_step = 0;
+- applet->animation_id = g_timeout_add (100, vpn_animation_timeout, applet);
+- }
++ foo_set_icon (applet, applet->network_connecting_icon, ICON_LAYER_VPN);
+ break;
+ case NM_VPN_CONNECTION_STATE_FAILED:
+ // vpn_connection_info_set_last_attempt_success (info, FALSE);
+@@ -1053,10 +1030,6 @@
+ g_hash_table_remove (applet->vpn_connections, nm_vpn_connection_get_name (connection));
+ /* Fall through */
+ default:
+- if (applet->animation_id) {
+- g_source_remove (applet->animation_id);
+- applet->animation_id = 0;
+- }
+ foo_set_icon (applet, NULL, ICON_LAYER_VPN);
+ break;
+ }
+@@ -2295,45 +2268,6 @@
+ } FooAnimationTimeoutInfo;
+
+ static void
+-foo_animation_timeout_info_destroy (gpointer data)
+-{
+- g_slice_free (FooAnimationTimeoutInfo, data);
+-}
+-
+-static gboolean
+-foo_animation_timeout (gpointer data)
+-{
+- FooAnimationTimeoutInfo *info = (FooAnimationTimeoutInfo *) data;
+- NMApplet *applet = info->applet;
+- int stage = -1;
+-
+- switch (info->state) {
+- case NM_DEVICE_STATE_PREPARE:
+- stage = 0;
+- break;
+- case NM_DEVICE_STATE_CONFIG:
+- stage = 1;
+- break;
+- case NM_DEVICE_STATE_IP_CONFIG:
+- stage = 2;
+- break;
+- default:
+- break;
+- }
+-
+- if (stage >= 0)
+- foo_set_icon (applet,
+- applet->network_connecting_icons[stage][applet->animation_step],
+- ICON_LAYER_LINK);
+-
+- applet->animation_step++;
+- if (applet->animation_step >= NUM_CONNECTING_FRAMES)
+- applet->animation_step = 0;
+-
+- return TRUE;
+-}
+-
+-static void
+ foo_common_state_change (NMDevice *device, NMDeviceState state, NMApplet *applet)
+ {
+ FooAnimationTimeoutInfo *info;
+@@ -2345,11 +2279,7 @@
+ info = g_slice_new (FooAnimationTimeoutInfo);
+ info->applet = applet;
+ info->state = state;
+- applet->animation_step = 0;
+- applet->animation_id = g_timeout_add_full (G_PRIORITY_DEFAULT_IDLE,
+- 100, foo_animation_timeout,
+- info,
+- foo_animation_timeout_info_destroy);
++ foo_set_icon (applet, applet->network_connecting_icon, ICON_LAYER_LINK);
+ break;
+ case NM_DEVICE_STATE_ACTIVATED:
+ break;
+@@ -2602,12 +2532,6 @@
+ NMApplet *applet = NM_APPLET (user_data);
+ gboolean handled = FALSE;
+
+- applet->animation_step = 0;
+- if (applet->animation_id) {
+- g_source_remove (applet->animation_id);
+- applet->animation_id = 0;
+- }
+-
+ clear_active_connections (applet);
+ applet->active_connections = nm_client_get_active_connections (applet->nm_client);
+
+@@ -3166,17 +3090,8 @@
+ if (applet->wireless_100_icon)
+ g_object_unref (applet->wireless_100_icon);
+
+- for (i = 0; i < NUM_CONNECTING_STAGES; i++) {
+- int j;
+-
+- for (j = 0; j < NUM_CONNECTING_FRAMES; j++)
+- if (applet->network_connecting_icons[i][j])
+- g_object_unref (applet->network_connecting_icons[i][j]);
+- }
+-
+- for (i = 0; i < NUM_VPN_CONNECTING_FRAMES; i++)
+- if (applet->vpn_connecting_icons[i])
+- g_object_unref (applet->vpn_connecting_icons[i]);
++ if (applet->network_connecting_icon)
++ g_object_unref (applet->network_connecting_icon);
+
+ nma_icons_zero (applet);
+ }
+@@ -3196,16 +3111,7 @@
+ applet->wireless_75_icon = NULL;
+ applet->wireless_100_icon = NULL;
+
+- for (i = 0; i < NUM_CONNECTING_STAGES; i++)
+- {
+- int j;
+-
+- for (j = 0; j < NUM_CONNECTING_FRAMES; j++)
+- applet->network_connecting_icons[i][j] = NULL;
+- }
+-
+- for (i = 0; i < NUM_VPN_CONNECTING_FRAMES; i++)
+- applet->vpn_connecting_icons[i] = NULL;
++ applet->network_connecting_icon = NULL;
+
+ applet->icons_loaded = FALSE;
+ }
+@@ -3257,28 +3163,7 @@
+ ICON_LOAD(applet->wireless_75_icon, "nm-signal-75");
+ ICON_LOAD(applet->wireless_100_icon, "nm-signal-100");
+
+- for (i = 0; i < NUM_CONNECTING_STAGES; i++)
+- {
+- int j;
+-
+- for (j = 0; j < NUM_CONNECTING_FRAMES; j++)
+- {
+- char *name;
+-
+- name = g_strdup_printf ("nm-stage%02d-connecting%02d", i+1, j+1);
+- ICON_LOAD(applet->network_connecting_icons[i][j], name);
+- g_free (name);
+- }
+- }
+-
+- for (i = 0; i < NUM_VPN_CONNECTING_FRAMES; i++)
+- {
+- char *name;
+-
+- name = g_strdup_printf ("nm-vpn-connecting%02d", i+1);
+- ICON_LOAD(applet->vpn_connecting_icons[i], name);
+- g_free (name);
+- }
++ ICON_LOAD(applet->network_connecting_icon, "nm-connecting");
+
+ success = TRUE;
+
+Index: trunk/src/applet.h
+===================================================================
+--- trunk.orig/src/applet.h 2008-02-06 20:30:06.000000000 +0000
++++ trunk/src/applet.h 2008-02-06 20:46:05.000000000 +0000
+@@ -111,20 +111,12 @@
+ GdkPixbuf * wireless_50_icon;
+ GdkPixbuf * wireless_75_icon;
+ GdkPixbuf * wireless_100_icon;
+-#define NUM_CONNECTING_STAGES 3
+-#define NUM_CONNECTING_FRAMES 11
+- GdkPixbuf * network_connecting_icons[NUM_CONNECTING_STAGES][NUM_CONNECTING_FRAMES];
+-#define NUM_VPN_CONNECTING_FRAMES 14
+- GdkPixbuf * vpn_connecting_icons[NUM_VPN_CONNECTING_FRAMES];
++ GdkPixbuf * network_connecting_icon;
+ GdkPixbuf * vpn_lock_icon;
+
+ /* Active status icon pixbufs */
+ GdkPixbuf * icon_layers[ICON_LAYER_MAX + 1];
+
+- /* Animation stuff */
+- int animation_step;
+- guint animation_id;
+-
+ /* Direct UI elements */
+ #ifdef HAVE_STATUS_ICON
+ GtkStatusIcon * status_icon;
diff --git a/meta-extras/packages/networkmanager/files/applet-no-gnome.diff b/meta-extras/packages/networkmanager/files/applet-no-gnome.diff
new file mode 100644
index 0000000000..e098e8c9ed
--- /dev/null
+++ b/meta-extras/packages/networkmanager/files/applet-no-gnome.diff
@@ -0,0 +1,59 @@
+---
+ configure.ac | 3 +--
+ src/main.c | 8 ++++++++
+ 2 files changed, 9 insertions(+), 2 deletions(-)
+
+Index: src/main.c
+===================================================================
+--- src/main.c.orig 2007-09-26 10:39:16.000000000 +0100
++++ src/main.c 2007-09-26 10:39:37.000000000 +0100
+@@ -27,7 +27,9 @@
+
+ #include <string.h>
+ #include <gtk/gtk.h>
++#if 0
+ #include <libgnomeui/libgnomeui.h>
++#endif
+ #include <glib/gi18n-lib.h>
+
+ #include "applet.h"
+@@ -36,11 +38,15 @@
+ int main (int argc, char *argv[])
+ {
+ NMApplet * applet;
++#if 0
+ GnomeProgram * program;
+
+ program = gnome_program_init ("nm-applet", VERSION, LIBGNOMEUI_MODULE,
+ argc, argv,
+ GNOME_PARAM_NONE, GNOME_PARAM_NONE);
++#else
++ gtk_init (&argc, &argv);
++#endif
+
+ bindtextdomain (GETTEXT_PACKAGE, GNOMELOCALEDIR);
+ bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8");
+@@ -53,7 +59,9 @@ int main (int argc, char *argv[])
+ gtk_main ();
+
+ g_object_unref (applet);
++#if 0
+ g_object_unref (program);
++#endif
+
+ exit (0);
+ }
+Index: configure.ac
+===================================================================
+--- configure.ac.orig 2007-09-26 10:39:30.000000000 +0100
++++ configure.ac 2007-09-26 10:39:37.000000000 +0100
+@@ -65,8 +65,7 @@ PKG_CHECK_MODULES(NMA,
+ gtk+-2.0 >= 2.6
+ libglade-2.0
+ gconf-2.0
+- gnome-keyring-1
+- libgnomeui-2.0])
++ gnome-keyring-1])
+
+ ##### Find out the version of DBUS we're using
+ dbus_version=`pkg-config --modversion dbus-1`
diff --git a/meta-extras/packages/networkmanager/files/libnlfix.patch b/meta-extras/packages/networkmanager/files/libnlfix.patch
new file mode 100644
index 0000000000..69f4922ea0
--- /dev/null
+++ b/meta-extras/packages/networkmanager/files/libnlfix.patch
@@ -0,0 +1,29 @@
+Index: trunk/src/nm-netlink.c
+===================================================================
+--- trunk.orig/src/nm-netlink.c 2007-09-25 22:37:50.000000000 +0100
++++ trunk/src/nm-netlink.c 2009-05-16 12:44:26.000000000 +0100
+@@ -52,16 +52,20 @@
+ struct nl_handle *
+ nm_netlink_get_default_handle (void)
+ {
++ struct nl_cb *cb;
++
+ if (def_nl_handle)
+ return def_nl_handle;
+
+- def_nl_handle = nl_handle_alloc_nondefault (NL_CB_VERBOSE);
+- g_assert (def_nl_handle);
++ cb = nl_cb_alloc(NL_CB_VERBOSE);
++ def_nl_handle = nl_handle_alloc_cb (cb);
++ if (!def_nl_handle) {
++ nm_warning ("couldn't allocate netlink handle.");
++ return NULL;
++ }
+
+- nl_handle_set_pid (def_nl_handle, (pthread_self () << 16 | getpid ()));
+ if (nl_connect (def_nl_handle, NETLINK_ROUTE) < 0) {
+ nm_error ("couldn't connect to netlink: %s", nl_geterror ());
+- nl_handle_destroy (def_nl_handle);
+ return NULL;
+ }
+
diff --git a/meta-extras/packages/networkmanager/files/makefile-fix.patch b/meta-extras/packages/networkmanager/files/makefile-fix.patch
new file mode 100644
index 0000000000..5fbbf3a74a
--- /dev/null
+++ b/meta-extras/packages/networkmanager/files/makefile-fix.patch
@@ -0,0 +1,17 @@
+This line causes libtool to try and create a program which fails since there is no
+main(). This is hidden with libtool 1.5.10 but appears with 2.2.2.
+
+RP - 14/4/08
+
+Index: trunk/src/ppp-manager/Makefile.am
+===================================================================
+--- trunk.orig/src/ppp-manager/Makefile.am 2008-04-14 23:00:54.000000000 +0100
++++ trunk/src/ppp-manager/Makefile.am 2008-04-14 23:01:24.000000000 +0100
+@@ -25,7 +25,6 @@
+ $(top_builddir)/src/marshallers/libmarshallers.la
+
+ nm_pppd_plugindir = $(libdir)
+-nm_pppd_plugin_PROGRAMS = nm-pppd-plugin.so
+
+ nm_pppd_plugin_so_SOURCES = \
+ nm-pppd-plugin.c \
diff --git a/meta-extras/packages/networkmanager/files/nmutil-fix.patch b/meta-extras/packages/networkmanager/files/nmutil-fix.patch
new file mode 100644
index 0000000000..d8495bac40
--- /dev/null
+++ b/meta-extras/packages/networkmanager/files/nmutil-fix.patch
@@ -0,0 +1,12 @@
+Index: trunk/configure.ac
+===================================================================
+--- trunk.orig/configure.ac 2009-01-08 10:49:26.000000000 -0600
++++ trunk/configure.ac 2009-01-08 12:00:34.000000000 -0600
+@@ -62,6 +62,7 @@
+ glib-2.0 >= 2.10
+ NetworkManager >= 0.7.0
+ libnm_glib
++ libnm-util
+ gtk+-2.0 >= 2.6
+ libglade-2.0
+ gconf-2.0
diff --git a/meta-extras/packages/networkmanager/files/no-restarts.diff b/meta-extras/packages/networkmanager/files/no-restarts.diff
new file mode 100644
index 0000000000..20bdf82aab
--- /dev/null
+++ b/meta-extras/packages/networkmanager/files/no-restarts.diff
@@ -0,0 +1,21 @@
+Index: src/backends/NetworkManagerDebian.c
+===================================================================
+--- src/backends/NetworkManagerDebian.c (revision 2881)
++++ src/backends/NetworkManagerDebian.c (working copy)
+@@ -204,8 +204,6 @@
+ */
+ void nm_system_update_dns (void)
+ {
+- nm_spawn_process ("/usr/sbin/invoke-rc.d nscd restart");
+-
+ }
+
+
+@@ -218,7 +216,6 @@
+ */
+ void nm_system_restart_mdns_responder (void)
+ {
+- nm_spawn_process ("/usr/bin/killall -q -USR1 mDNSResponder");
+ }
+
+
diff --git a/meta-extras/packages/networkmanager/files/no_vpn.patch b/meta-extras/packages/networkmanager/files/no_vpn.patch
new file mode 100644
index 0000000000..49423e879f
--- /dev/null
+++ b/meta-extras/packages/networkmanager/files/no_vpn.patch
@@ -0,0 +1,13 @@
+Index: trunk/src/applet.c
+===================================================================
+--- trunk.orig/src/applet.c 2008-02-29 17:47:39.000000000 +0000
++++ trunk/src/applet.c 2008-02-29 17:48:38.000000000 +0000
+@@ -1783,7 +1783,7 @@
+ }
+
+ nma_menu_add_devices (menu, applet);
+- nma_menu_add_vpn_submenu (menu, applet);
++ //nma_menu_add_vpn_submenu (menu, applet);
+
+ gtk_widget_show_all (applet->menu);
+