/[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.3 - (hide annotations) (download)
Mon Dec 1 10:16:21 2014 UTC (21 months, 3 weeks ago) by pacho
Branch: MAIN
CVS Tags: HEAD
Changes since 1.2: +1 -1 lines
FILE REMOVED
drop old

(Portage version: 2.2.14/cvs/Linux x86_64, signed Manifest commit with key A188FBD4)

1 tetromino 1.2 From 705b9978ed914aba87e5a5191a1d0acacaf70a81 Mon Sep 17 00:00:00 2001
2 tetromino 1.1 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 tetromino 1.2 initscript/Gentoo/NetworkManager.in | 26 +++++++++++++++++++++++++-
11     1 files changed, 25 insertions(+), 1 deletions(-)
12 tetromino 1.1
13     diff --git a/initscript/Gentoo/NetworkManager.in b/initscript/Gentoo/NetworkManager.in
14 tetromino 1.2 index 7db410b..1960795 100755
15 tetromino 1.1 --- a/initscript/Gentoo/NetworkManager.in
16     +++ b/initscript/Gentoo/NetworkManager.in
17 tetromino 1.2 @@ -3,18 +3,42 @@
18 tetromino 1.1 # Distributed under the terms of the GNU General Purpose License v2
19 pacho 1.3 # $Header: /var/cvsroot/gentoo-x86/net-misc/networkmanager/files/networkmanager-0.9.2.0-init-provide-net-r1.patch,v 1.2 2012/02/21 23:19:19 tetromino Exp $
20 tetromino 1.1
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 tetromino 1.2 + [ -z "${INACTIVE_TIMEOUT}" ] && INACTIVE_TIMEOUT="1"
35     +
36 tetromino 1.1 ebegin "Starting NetworkManager"
37     start-stop-daemon --start --quiet --pidfile /var/run/NetworkManager.pid \
38     --exec /usr/sbin/NetworkManager -- --pid-file /var/run/NetworkManager.pid
39     - eend $?
40     + local _retval=$?
41     + eend "${_retval}"
42 tetromino 1.2 + if [ "x${_retval}" = 'x0' ] && ! nm-online -t "${INACTIVE_TIMEOUT}"; then
43     + einfo "Marking NetworkManager as inactive. It will automatically be marked"
44     + einfo "as started after a network connection has been established."
45     + mark_service_inactive
46 tetromino 1.1 + fi
47     + return "${_retval}"
48     }
49    
50     stop() {
51     + # If we are re-called by a dispatcher event, we want to mark the service
52     + # as inactive without stopping the daemon
53     + if yesno "${IN_BACKGROUND}"; then
54     + mark_service_inactive "${SVCNAME}"
55     + return 0
56     + fi
57     +
58     ebegin "Stopping NetworkManager"
59     start-stop-daemon --stop --quiet --pidfile /var/run/NetworkManager.pid
60     eend $?
61     --
62     1.7.8.4
63    

  ViewVC Help
Powered by ViewVC 1.1.20