/[gentoo-x86]/net-misc/networkmanager/files/networkmanager-0.9.2.0-init-provide-net-r1.patch
Gentoo

Contents of /net-misc/networkmanager/files/networkmanager-0.9.2.0-init-provide-net-r1.patch

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.1 - (show annotations) (download)
Mon Feb 20 09:24:59 2012 UTC (2 years, 1 month ago) by tetromino
Branch: MAIN
Fix openrc service going inactive while active connections are present (bug #402613, thanks to Thomas Witt). Try to be more user-friendly by waiting a few seconds before marking the service as inactive. Dispatch a pre-sleep event to unmount network filesystems before suspending (bug #402085, thanks to Marien Zwart). Do not truncate WPA passwords at '#' character (bug #402133, thanks to John Hardin).

(Portage version: 2.2.0_alpha87/cvs/Linux x86_64)

1 From e99873e7583a3838e0873b1d0b1f9c3dac49f853 Mon Sep 17 00:00:00 2001
2 From: Alexandre Rostovtsev <tetromino@gentoo.org>
3 Date: Wed, 1 Feb 2012 05:51:20 -0500
4 Subject: [PATCH] gentoo: provide net and use inactive status when not
5 connected
6
7 The status will be reset to started via a dispatcher script on up/down
8 events. See https://bugs.gentoo.org/show_bug.cgi?id=252137
9 ---
10 initscript/Gentoo/NetworkManager.in | 22 +++++++++++++++++++++-
11 1 files changed, 21 insertions(+), 1 deletions(-)
12
13 diff --git a/initscript/Gentoo/NetworkManager.in b/initscript/Gentoo/NetworkManager.in
14 index 7db410b..34f19b1 100755
15 --- a/initscript/Gentoo/NetworkManager.in
16 +++ b/initscript/Gentoo/NetworkManager.in
17 @@ -3,18 +3,38 @@
18 # Distributed under the terms of the GNU General Purpose License v2
19 # $Header: $
20
21 +description="NetworkManager daemon. The service is marked as started only \
22 +when a network connection is established."
23 +
24 depend() {
25 need dbus
26 + provide net
27 }
28
29 start() {
30 + # If we are re-called by a dispatcher event, we want to mark the service
31 + # as started without starting the daemon again
32 + yesno "${IN_BACKGROUND}" && return 0
33 +
34 ebegin "Starting NetworkManager"
35 start-stop-daemon --start --quiet --pidfile /var/run/NetworkManager.pid \
36 --exec /usr/sbin/NetworkManager -- --pid-file /var/run/NetworkManager.pid
37 - eend $?
38 + local _retval=$?
39 + eend "${_retval}"
40 + if [ "x${_retval}" = 'x0' ]; then
41 + nm-online -t 5 || mark_service_inactive
42 + fi
43 + return "${_retval}"
44 }
45
46 stop() {
47 + # If we are re-called by a dispatcher event, we want to mark the service
48 + # as inactive without stopping the daemon
49 + if yesno "${IN_BACKGROUND}"; then
50 + mark_service_inactive "${SVCNAME}"
51 + return 0
52 + fi
53 +
54 ebegin "Stopping NetworkManager"
55 start-stop-daemon --stop --quiet --pidfile /var/run/NetworkManager.pid
56 eend $?
57 --
58 1.7.8.4

  ViewVC Help
Powered by ViewVC 1.1.20