1 |
tetromino 12/02/01 07:46:37 |
2 |
|
3 |
Added: nm-interfaces |
4 |
networkmanager-0.9.2.0-ifnet-unquote-hostname.patch |
5 |
10-openrc-nm-interfaces |
6 |
Removed: networkmanager-0.9.1.95-glib-2.31.patch |
7 |
networkmanager-0.9.1.95-keyfile-scheme.patch |
8 |
networkmanager-0.9.1.95-dns-routing-unmanaged-devices.patch |
9 |
Log: |
10 |
Install nm-interfaces service to provide net dependency for openrc only when nm is connected (inspired by Xake's solution in bug #252137). Correctly deal with single quotes in /etc/conf.d/hostname. Do not create /var/run/NetworkManager, it's not needed in Gentoo (bug #401019, thanks to Maxim Kammerer). Drop old. |
11 |
|
12 |
(Portage version: 2.2.0_alpha84/cvs/Linux x86_64) |
13 |
|
14 |
Revision Changes Path |
15 |
1.1 net-misc/networkmanager/files/nm-interfaces |
16 |
|
17 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-misc/networkmanager/files/nm-interfaces?rev=1.1&view=markup |
18 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-misc/networkmanager/files/nm-interfaces?rev=1.1&content-type=text/plain |
19 |
|
20 |
Index: nm-interfaces |
21 |
=================================================================== |
22 |
#!/sbin/runscript |
23 |
# Copyright (c) 2012 Alexandre Rostovtsev |
24 |
# Released under the 2-clause BSD license. |
25 |
|
26 |
description="Virtual service for interfaces configured by NetworkManager. \ |
27 |
Do not start this service manually or add it to any runlevels!" |
28 |
|
29 |
depend() |
30 |
{ |
31 |
need NetworkManager |
32 |
provide net |
33 |
} |
34 |
|
35 |
start() |
36 |
{ |
37 |
eerror "${RC_SVCNAME} should not be started manually or added to any runlevels." |
38 |
return 1 |
39 |
} |
40 |
|
41 |
# Separate function to prevent warnings on starting service multiple times |
42 |
mark_started() |
43 |
{ |
44 |
service_started && return 0 |
45 |
ebegin "Marking NetworkManager network interfaces as started" |
46 |
mark_service_started |
47 |
eend 0 |
48 |
} |
49 |
|
50 |
stop() |
51 |
{ |
52 |
[ "x$(LC_ALL=C nmcli -t -f state nm 2> /dev/null)" = "xconnected" ] && return 1 |
53 |
ebegin "Marking NetworkManager network interfaces as stopped" |
54 |
eend 0 |
55 |
} |
56 |
|
57 |
|
58 |
|
59 |
1.1 net-misc/networkmanager/files/networkmanager-0.9.2.0-ifnet-unquote-hostname.patch |
60 |
|
61 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-misc/networkmanager/files/networkmanager-0.9.2.0-ifnet-unquote-hostname.patch?rev=1.1&view=markup |
62 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-misc/networkmanager/files/networkmanager-0.9.2.0-ifnet-unquote-hostname.patch?rev=1.1&content-type=text/plain |
63 |
|
64 |
Index: networkmanager-0.9.2.0-ifnet-unquote-hostname.patch |
65 |
=================================================================== |
66 |
From 8f3c3242a762d77fedd745273a1cdca7f9a2b2f6 Mon Sep 17 00:00:00 2001 |
67 |
From: Alexandre Rostovtsev <tetromino@g.o> |
68 |
Date: Tue, 31 Jan 2012 21:10:01 -0500 |
69 |
Subject: [PATCH] ifnet: properly unquote hostnames with g_shell_unquote() |
70 |
|
71 |
If /etc/conf.d/hostname contains "hostname='foo'", then the hostname |
72 |
needs to be set to "foo", not "'foo'". |
73 |
|
74 |
https://bugzilla.gnome.org/show_bug.cgi?id=669148 |
75 |
--- |
76 |
src/settings/plugins/ifnet/net_utils.c | 3 +-- |
77 |
1 files changed, 1 insertions(+), 2 deletions(-) |
78 |
|
79 |
diff --git a/src/settings/plugins/ifnet/net_utils.c b/src/settings/plugins/ifnet/net_utils.c |
80 |
index b533ae3..36b465d 100644 |
81 |
--- a/src/settings/plugins/ifnet/net_utils.c |
82 |
+++ b/src/settings/plugins/ifnet/net_utils.c |
83 |
@@ -242,8 +242,7 @@ read_hostname (const char *path) |
84 |
if (g_str_has_prefix (all_lines[i], "hostname")) { |
85 |
tmp = strstr (all_lines[i], "="); |
86 |
tmp++; |
87 |
- tmp = strip_string (tmp, '"'); |
88 |
- result = g_strdup (tmp); |
89 |
+ result = g_shell_unquote (tmp, NULL); |
90 |
break; |
91 |
} |
92 |
|
93 |
-- |
94 |
1.7.8.4 |
95 |
|
96 |
|
97 |
|
98 |
|
99 |
1.1 net-misc/networkmanager/files/10-openrc-nm-interfaces |
100 |
|
101 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-misc/networkmanager/files/10-openrc-nm-interfaces?rev=1.1&view=markup |
102 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-misc/networkmanager/files/10-openrc-nm-interfaces?rev=1.1&content-type=text/plain |
103 |
|
104 |
Index: 10-openrc-nm-interfaces |
105 |
=================================================================== |
106 |
#!/bin/sh |
107 |
# Copyright (c) 2012 Alexandre Rostovtsev |
108 |
# Released under the 2-clause BSD license. |
109 |
|
110 |
# Ensures that the nm-interfaces OpenRC service is marked as started if |
111 |
# NetworkManager had been started via openrc and brought up some interfaces. |
112 |
|
113 |
# Exit if no valid interface name given |
114 |
if [ -z "$1" -o "x$1" = "xnone" ]; then |
115 |
exit 1 |
116 |
fi |
117 |
|
118 |
# Exit if the NetworkManager OpenRC service is not running |
119 |
"@EPREFIX@/etc/init.d/NetworkManager" status &> /dev/null || exit 1 |
120 |
|
121 |
case "$2" in |
122 |
up) |
123 |
exec "@EPREFIX@/etc/init.d/nm-interfaces" mark-started |
124 |
;; |
125 |
down) |
126 |
exec "@EPREFIX/etc/init.d/nm-interfaces" stop |
127 |
;; |
128 |
esac |
129 |
|
130 |
exit 1 |