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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.2 - (show annotations) (download)
Thu Sep 13 09:54:12 2012 UTC (2 years, 1 month ago) by tetromino
Branch: MAIN
CVS Tags: HEAD
Changes since 1.1: +1 -1 lines
FILE REMOVED
Version bump with various fixes. No longer saves thousands of temporary ipv6 routes (bug #428274, thanks to Matthias Nagel). No longer installs dispatcher and init scripts when USE=systemd to avoid annoying systemd users (bug #434692, thanks to Arne St├Ącker). Drop old.

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

1 From dbb1ed70eca25d57da3c12534c241cd38134627b 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 | 24 +++++++++++++++++++++++-
11 1 files changed, 23 insertions(+), 1 deletions(-)
12
13 diff --git a/initscript/Gentoo/NetworkManager.in b/initscript/Gentoo/NetworkManager.in
14 index 7db410b..d26996d 100755
15 --- a/initscript/Gentoo/NetworkManager.in
16 +++ b/initscript/Gentoo/NetworkManager.in
17 @@ -3,18 +3,40 @@
18 # Distributed under the terms of the GNU General Purpose License v2
19 # $Header: /var/cvsroot/gentoo-x86/net-misc/networkmanager/files/networkmanager-0.9.2.0-init-provide-net.patch,v 1.1 2012/02/02 00:34:59 tetromino Exp $
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 +_is_connected() {
30 + [ "x$(LC_ALL=C nmcli -t -f state nm 2> /dev/null)" = "xconnected" ]
31 + return $?
32 }
33
34 start() {
35 + if yesno "${IN_BACKGROUND}"; then
36 + _is_connected && mark_service_started
37 + return
38 + fi
39 ebegin "Starting NetworkManager"
40 start-stop-daemon --start --quiet --pidfile /var/run/NetworkManager.pid \
41 --exec /usr/sbin/NetworkManager -- --pid-file /var/run/NetworkManager.pid
42 - eend $?
43 + local _retval=$?
44 + eend "${_retval}"
45 + if [ "x${_retval}" = 'x0' ]; then
46 + _is_connected || mark_service_inactive
47 + fi
48 + return "${_retval}"
49 }
50
51 stop() {
52 + if yesno "${IN_BACKGROUND}"; then
53 + _is_connected || mark_service_inactive
54 + return
55 + fi
56 ebegin "Stopping NetworkManager"
57 start-stop-daemon --stop --quiet --pidfile /var/run/NetworkManager.pid
58 eend $?
59 --
60 1.7.8.4

  ViewVC Help
Powered by ViewVC 1.1.20