diff options
author | Richard Purdie <richard@openedhand.com> | 2008-02-07 20:00:09 +0000 |
---|---|---|
committer | Richard Purdie <richard@openedhand.com> | 2008-02-07 20:00:09 +0000 |
commit | e600587fdc3f3e55de886c6f883f55777df7dfcf (patch) | |
tree | 890aa44e885a8d99897850d1312b94bb91d897c8 /meta/packages/networkmanager/files | |
parent | fc20c6cbee24e0382d2cd486ddd693202a2e2541 (diff) | |
download | poky-e600587fdc3f3e55de886c6f883f55777df7dfcf.tar.gz |
networkmanager: Move from meta-extras to meta
git-svn-id: https://svn.o-hand.com/repos/poky/trunk@3709 311d38ba-8fff-0310-9ca6-ca027cbcb966
Diffstat (limited to 'meta/packages/networkmanager/files')
5 files changed, 347 insertions, 0 deletions
diff --git a/meta/packages/networkmanager/files/25NetworkManager b/meta/packages/networkmanager/files/25NetworkManager new file mode 100644 index 0000000000..676fde35c5 --- /dev/null +++ b/meta/packages/networkmanager/files/25NetworkManager | |||
@@ -0,0 +1,32 @@ | |||
1 | #!/bin/sh | ||
2 | # | ||
3 | # NetworkManager startup script | ||
4 | |||
5 | . /etc/profile | ||
6 | |||
7 | case $1 in | ||
8 | 'start') | ||
9 | echo -n "Starting NetworkManager daemon: NetworkManager" | ||
10 | /usr/sbin/NetworkManager | ||
11 | /usr/sbin/NetworkManagerDispatcher | ||
12 | /usr/sbin/wpa_supplicant -u & | ||
13 | echo "." | ||
14 | ;; | ||
15 | |||
16 | 'stop') | ||
17 | echo -n "Stopping NetworkManager daemon: NetworkManager" | ||
18 | kill `ps |grep /usr/sbin/NetworkManagerDispatcher | grep -v grep | cut "-d " -f2` | ||
19 | kill `ps |grep /usr/sbin/NetworkManager | grep -v grep | cut "-d " -f2` | ||
20 | kill `ps |grep /usr/sbin/wpa_supplicant | grep -v grep | cut "-d " -f2` | ||
21 | echo "." | ||
22 | ;; | ||
23 | |||
24 | 'restart') | ||
25 | $0 stop | ||
26 | $0 start | ||
27 | ;; | ||
28 | |||
29 | *) | ||
30 | echo "Usage: $0 { start | stop | restart }" | ||
31 | ;; | ||
32 | esac | ||
diff --git a/meta/packages/networkmanager/files/99_networkmanager b/meta/packages/networkmanager/files/99_networkmanager new file mode 100644 index 0000000000..20cbcc1bca --- /dev/null +++ b/meta/packages/networkmanager/files/99_networkmanager | |||
@@ -0,0 +1 @@ | |||
d root root 0700 /var/run/NetworkManager none | |||
diff --git a/meta/packages/networkmanager/files/applet-no-animation.patch b/meta/packages/networkmanager/files/applet-no-animation.patch new file mode 100644 index 0000000000..d437fd0fc9 --- /dev/null +++ b/meta/packages/networkmanager/files/applet-no-animation.patch | |||
@@ -0,0 +1,234 @@ | |||
1 | Index: trunk/src/applet.c | ||
2 | =================================================================== | ||
3 | --- trunk.orig/src/applet.c 2008-02-06 20:30:04.000000000 +0000 | ||
4 | +++ trunk/src/applet.c 2008-02-06 20:46:59.000000000 +0000 | ||
5 | @@ -111,8 +111,6 @@ | ||
6 | |||
7 | static void nma_init (NMApplet *applet) | ||
8 | { | ||
9 | - applet->animation_id = 0; | ||
10 | - applet->animation_step = 0; | ||
11 | applet->passphrase_dialog = NULL; | ||
12 | applet->icon_theme = NULL; | ||
13 | #ifdef ENABLE_NOTIFY | ||
14 | @@ -1006,20 +1004,6 @@ | ||
15 | } | ||
16 | } | ||
17 | |||
18 | -static gboolean | ||
19 | -vpn_animation_timeout (gpointer data) | ||
20 | -{ | ||
21 | - NMApplet *applet = NM_APPLET (data); | ||
22 | - | ||
23 | - foo_set_icon (applet, applet->vpn_connecting_icons[applet->animation_step], ICON_LAYER_VPN); | ||
24 | - | ||
25 | - applet->animation_step++; | ||
26 | - if (applet->animation_step >= NUM_VPN_CONNECTING_FRAMES) | ||
27 | - applet->animation_step = 0; | ||
28 | - | ||
29 | - return TRUE; | ||
30 | -} | ||
31 | - | ||
32 | static void | ||
33 | vpn_connection_state_changed (NMVPNConnection *connection, | ||
34 | NMVPNConnectionState state, | ||
35 | @@ -1030,10 +1014,6 @@ | ||
36 | |||
37 | switch (state) { | ||
38 | case NM_VPN_CONNECTION_STATE_ACTIVATED: | ||
39 | - if (applet->animation_id) { | ||
40 | - g_source_remove (applet->animation_id); | ||
41 | - applet->animation_id = 0; | ||
42 | - } | ||
43 | foo_set_icon (applet, applet->vpn_lock_icon, ICON_LAYER_VPN); | ||
44 | // vpn_connection_info_set_last_attempt_success (info, TRUE); | ||
45 | break; | ||
46 | @@ -1041,10 +1021,7 @@ | ||
47 | case NM_VPN_CONNECTION_STATE_NEED_AUTH: | ||
48 | case NM_VPN_CONNECTION_STATE_CONNECT: | ||
49 | case NM_VPN_CONNECTION_STATE_IP_CONFIG_GET: | ||
50 | - if (applet->animation_id == 0) { | ||
51 | - applet->animation_step = 0; | ||
52 | - applet->animation_id = g_timeout_add (100, vpn_animation_timeout, applet); | ||
53 | - } | ||
54 | + foo_set_icon (applet, applet->network_connecting_icon, ICON_LAYER_VPN); | ||
55 | break; | ||
56 | case NM_VPN_CONNECTION_STATE_FAILED: | ||
57 | // vpn_connection_info_set_last_attempt_success (info, FALSE); | ||
58 | @@ -1053,10 +1030,6 @@ | ||
59 | g_hash_table_remove (applet->vpn_connections, nm_vpn_connection_get_name (connection)); | ||
60 | /* Fall through */ | ||
61 | default: | ||
62 | - if (applet->animation_id) { | ||
63 | - g_source_remove (applet->animation_id); | ||
64 | - applet->animation_id = 0; | ||
65 | - } | ||
66 | foo_set_icon (applet, NULL, ICON_LAYER_VPN); | ||
67 | break; | ||
68 | } | ||
69 | @@ -2295,45 +2268,6 @@ | ||
70 | } FooAnimationTimeoutInfo; | ||
71 | |||
72 | static void | ||
73 | -foo_animation_timeout_info_destroy (gpointer data) | ||
74 | -{ | ||
75 | - g_slice_free (FooAnimationTimeoutInfo, data); | ||
76 | -} | ||
77 | - | ||
78 | -static gboolean | ||
79 | -foo_animation_timeout (gpointer data) | ||
80 | -{ | ||
81 | - FooAnimationTimeoutInfo *info = (FooAnimationTimeoutInfo *) data; | ||
82 | - NMApplet *applet = info->applet; | ||
83 | - int stage = -1; | ||
84 | - | ||
85 | - switch (info->state) { | ||
86 | - case NM_DEVICE_STATE_PREPARE: | ||
87 | - stage = 0; | ||
88 | - break; | ||
89 | - case NM_DEVICE_STATE_CONFIG: | ||
90 | - stage = 1; | ||
91 | - break; | ||
92 | - case NM_DEVICE_STATE_IP_CONFIG: | ||
93 | - stage = 2; | ||
94 | - break; | ||
95 | - default: | ||
96 | - break; | ||
97 | - } | ||
98 | - | ||
99 | - if (stage >= 0) | ||
100 | - foo_set_icon (applet, | ||
101 | - applet->network_connecting_icons[stage][applet->animation_step], | ||
102 | - ICON_LAYER_LINK); | ||
103 | - | ||
104 | - applet->animation_step++; | ||
105 | - if (applet->animation_step >= NUM_CONNECTING_FRAMES) | ||
106 | - applet->animation_step = 0; | ||
107 | - | ||
108 | - return TRUE; | ||
109 | -} | ||
110 | - | ||
111 | -static void | ||
112 | foo_common_state_change (NMDevice *device, NMDeviceState state, NMApplet *applet) | ||
113 | { | ||
114 | FooAnimationTimeoutInfo *info; | ||
115 | @@ -2345,11 +2279,7 @@ | ||
116 | info = g_slice_new (FooAnimationTimeoutInfo); | ||
117 | info->applet = applet; | ||
118 | info->state = state; | ||
119 | - applet->animation_step = 0; | ||
120 | - applet->animation_id = g_timeout_add_full (G_PRIORITY_DEFAULT_IDLE, | ||
121 | - 100, foo_animation_timeout, | ||
122 | - info, | ||
123 | - foo_animation_timeout_info_destroy); | ||
124 | + foo_set_icon (applet, applet->network_connecting_icon, ICON_LAYER_LINK); | ||
125 | break; | ||
126 | case NM_DEVICE_STATE_ACTIVATED: | ||
127 | break; | ||
128 | @@ -2602,12 +2532,6 @@ | ||
129 | NMApplet *applet = NM_APPLET (user_data); | ||
130 | gboolean handled = FALSE; | ||
131 | |||
132 | - applet->animation_step = 0; | ||
133 | - if (applet->animation_id) { | ||
134 | - g_source_remove (applet->animation_id); | ||
135 | - applet->animation_id = 0; | ||
136 | - } | ||
137 | - | ||
138 | clear_active_connections (applet); | ||
139 | applet->active_connections = nm_client_get_active_connections (applet->nm_client); | ||
140 | |||
141 | @@ -3166,17 +3090,8 @@ | ||
142 | if (applet->wireless_100_icon) | ||
143 | g_object_unref (applet->wireless_100_icon); | ||
144 | |||
145 | - for (i = 0; i < NUM_CONNECTING_STAGES; i++) { | ||
146 | - int j; | ||
147 | - | ||
148 | - for (j = 0; j < NUM_CONNECTING_FRAMES; j++) | ||
149 | - if (applet->network_connecting_icons[i][j]) | ||
150 | - g_object_unref (applet->network_connecting_icons[i][j]); | ||
151 | - } | ||
152 | - | ||
153 | - for (i = 0; i < NUM_VPN_CONNECTING_FRAMES; i++) | ||
154 | - if (applet->vpn_connecting_icons[i]) | ||
155 | - g_object_unref (applet->vpn_connecting_icons[i]); | ||
156 | + if (applet->network_connecting_icon) | ||
157 | + g_object_unref (applet->network_connecting_icon); | ||
158 | |||
159 | nma_icons_zero (applet); | ||
160 | } | ||
161 | @@ -3196,16 +3111,7 @@ | ||
162 | applet->wireless_75_icon = NULL; | ||
163 | applet->wireless_100_icon = NULL; | ||
164 | |||
165 | - for (i = 0; i < NUM_CONNECTING_STAGES; i++) | ||
166 | - { | ||
167 | - int j; | ||
168 | - | ||
169 | - for (j = 0; j < NUM_CONNECTING_FRAMES; j++) | ||
170 | - applet->network_connecting_icons[i][j] = NULL; | ||
171 | - } | ||
172 | - | ||
173 | - for (i = 0; i < NUM_VPN_CONNECTING_FRAMES; i++) | ||
174 | - applet->vpn_connecting_icons[i] = NULL; | ||
175 | + applet->network_connecting_icon = NULL; | ||
176 | |||
177 | applet->icons_loaded = FALSE; | ||
178 | } | ||
179 | @@ -3257,28 +3163,7 @@ | ||
180 | ICON_LOAD(applet->wireless_75_icon, "nm-signal-75"); | ||
181 | ICON_LOAD(applet->wireless_100_icon, "nm-signal-100"); | ||
182 | |||
183 | - for (i = 0; i < NUM_CONNECTING_STAGES; i++) | ||
184 | - { | ||
185 | - int j; | ||
186 | - | ||
187 | - for (j = 0; j < NUM_CONNECTING_FRAMES; j++) | ||
188 | - { | ||
189 | - char *name; | ||
190 | - | ||
191 | - name = g_strdup_printf ("nm-stage%02d-connecting%02d", i+1, j+1); | ||
192 | - ICON_LOAD(applet->network_connecting_icons[i][j], name); | ||
193 | - g_free (name); | ||
194 | - } | ||
195 | - } | ||
196 | - | ||
197 | - for (i = 0; i < NUM_VPN_CONNECTING_FRAMES; i++) | ||
198 | - { | ||
199 | - char *name; | ||
200 | - | ||
201 | - name = g_strdup_printf ("nm-vpn-connecting%02d", i+1); | ||
202 | - ICON_LOAD(applet->vpn_connecting_icons[i], name); | ||
203 | - g_free (name); | ||
204 | - } | ||
205 | + ICON_LOAD(applet->network_connecting_icon, "nm-connecting"); | ||
206 | |||
207 | success = TRUE; | ||
208 | |||
209 | Index: trunk/src/applet.h | ||
210 | =================================================================== | ||
211 | --- trunk.orig/src/applet.h 2008-02-06 20:30:06.000000000 +0000 | ||
212 | +++ trunk/src/applet.h 2008-02-06 20:46:05.000000000 +0000 | ||
213 | @@ -111,20 +111,12 @@ | ||
214 | GdkPixbuf * wireless_50_icon; | ||
215 | GdkPixbuf * wireless_75_icon; | ||
216 | GdkPixbuf * wireless_100_icon; | ||
217 | -#define NUM_CONNECTING_STAGES 3 | ||
218 | -#define NUM_CONNECTING_FRAMES 11 | ||
219 | - GdkPixbuf * network_connecting_icons[NUM_CONNECTING_STAGES][NUM_CONNECTING_FRAMES]; | ||
220 | -#define NUM_VPN_CONNECTING_FRAMES 14 | ||
221 | - GdkPixbuf * vpn_connecting_icons[NUM_VPN_CONNECTING_FRAMES]; | ||
222 | + GdkPixbuf * network_connecting_icon; | ||
223 | GdkPixbuf * vpn_lock_icon; | ||
224 | |||
225 | /* Active status icon pixbufs */ | ||
226 | GdkPixbuf * icon_layers[ICON_LAYER_MAX + 1]; | ||
227 | |||
228 | - /* Animation stuff */ | ||
229 | - int animation_step; | ||
230 | - guint animation_id; | ||
231 | - | ||
232 | /* Direct UI elements */ | ||
233 | #ifdef HAVE_STATUS_ICON | ||
234 | GtkStatusIcon * status_icon; | ||
diff --git a/meta/packages/networkmanager/files/applet-no-gnome.diff b/meta/packages/networkmanager/files/applet-no-gnome.diff new file mode 100644 index 0000000000..e098e8c9ed --- /dev/null +++ b/meta/packages/networkmanager/files/applet-no-gnome.diff | |||
@@ -0,0 +1,59 @@ | |||
1 | --- | ||
2 | configure.ac | 3 +-- | ||
3 | src/main.c | 8 ++++++++ | ||
4 | 2 files changed, 9 insertions(+), 2 deletions(-) | ||
5 | |||
6 | Index: src/main.c | ||
7 | =================================================================== | ||
8 | --- src/main.c.orig 2007-09-26 10:39:16.000000000 +0100 | ||
9 | +++ src/main.c 2007-09-26 10:39:37.000000000 +0100 | ||
10 | @@ -27,7 +27,9 @@ | ||
11 | |||
12 | #include <string.h> | ||
13 | #include <gtk/gtk.h> | ||
14 | +#if 0 | ||
15 | #include <libgnomeui/libgnomeui.h> | ||
16 | +#endif | ||
17 | #include <glib/gi18n-lib.h> | ||
18 | |||
19 | #include "applet.h" | ||
20 | @@ -36,11 +38,15 @@ | ||
21 | int main (int argc, char *argv[]) | ||
22 | { | ||
23 | NMApplet * applet; | ||
24 | +#if 0 | ||
25 | GnomeProgram * program; | ||
26 | |||
27 | program = gnome_program_init ("nm-applet", VERSION, LIBGNOMEUI_MODULE, | ||
28 | argc, argv, | ||
29 | GNOME_PARAM_NONE, GNOME_PARAM_NONE); | ||
30 | +#else | ||
31 | + gtk_init (&argc, &argv); | ||
32 | +#endif | ||
33 | |||
34 | bindtextdomain (GETTEXT_PACKAGE, GNOMELOCALEDIR); | ||
35 | bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8"); | ||
36 | @@ -53,7 +59,9 @@ int main (int argc, char *argv[]) | ||
37 | gtk_main (); | ||
38 | |||
39 | g_object_unref (applet); | ||
40 | +#if 0 | ||
41 | g_object_unref (program); | ||
42 | +#endif | ||
43 | |||
44 | exit (0); | ||
45 | } | ||
46 | Index: configure.ac | ||
47 | =================================================================== | ||
48 | --- configure.ac.orig 2007-09-26 10:39:30.000000000 +0100 | ||
49 | +++ configure.ac 2007-09-26 10:39:37.000000000 +0100 | ||
50 | @@ -65,8 +65,7 @@ PKG_CHECK_MODULES(NMA, | ||
51 | gtk+-2.0 >= 2.6 | ||
52 | libglade-2.0 | ||
53 | gconf-2.0 | ||
54 | - gnome-keyring-1 | ||
55 | - libgnomeui-2.0]) | ||
56 | + gnome-keyring-1]) | ||
57 | |||
58 | ##### Find out the version of DBUS we're using | ||
59 | dbus_version=`pkg-config --modversion dbus-1` | ||
diff --git a/meta/packages/networkmanager/files/no-restarts.diff b/meta/packages/networkmanager/files/no-restarts.diff new file mode 100644 index 0000000000..20bdf82aab --- /dev/null +++ b/meta/packages/networkmanager/files/no-restarts.diff | |||
@@ -0,0 +1,21 @@ | |||
1 | Index: src/backends/NetworkManagerDebian.c | ||
2 | =================================================================== | ||
3 | --- src/backends/NetworkManagerDebian.c (revision 2881) | ||
4 | +++ src/backends/NetworkManagerDebian.c (working copy) | ||
5 | @@ -204,8 +204,6 @@ | ||
6 | */ | ||
7 | void nm_system_update_dns (void) | ||
8 | { | ||
9 | - nm_spawn_process ("/usr/sbin/invoke-rc.d nscd restart"); | ||
10 | - | ||
11 | } | ||
12 | |||
13 | |||
14 | @@ -218,7 +216,6 @@ | ||
15 | */ | ||
16 | void nm_system_restart_mdns_responder (void) | ||
17 | { | ||
18 | - nm_spawn_process ("/usr/bin/killall -q -USR1 mDNSResponder"); | ||
19 | } | ||
20 | |||
21 | |||