summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexandre Rostovtsev <tetromino@gentoo.org>2012-02-21 23:19:19 +0000
committerAlexandre Rostovtsev <tetromino@gentoo.org>2012-02-21 23:19:19 +0000
commitde02508a1c7c796c746d4f752471ad66b952359f (patch)
tree680d4de68e2d2530fb656ed60afdc1a43564a55c /net-misc/networkmanager
parentversion bump (diff)
downloadgentoo-2-de02508a1c7c796c746d4f752471ad66b952359f.tar.gz
gentoo-2-de02508a1c7c796c746d4f752471ad66b952359f.tar.bz2
gentoo-2-de02508a1c7c796c746d4f752471ad66b952359f.zip
Make timeout to go inactive at init.d script startup configurable, and reduce it to 1 second by default (bug #405141, thanks to Sylvain Alain).
(Portage version: 2.2.0_alpha87/cvs/Linux x86_64)
Diffstat (limited to 'net-misc/networkmanager')
-rw-r--r--net-misc/networkmanager/ChangeLog11
-rw-r--r--net-misc/networkmanager/files/conf.d.NetworkManager4
-rw-r--r--net-misc/networkmanager/files/networkmanager-0.9.2.0-init-provide-net-r1.patch20
-rw-r--r--net-misc/networkmanager/networkmanager-0.9.2.0-r5.ebuild (renamed from net-misc/networkmanager/networkmanager-0.9.2.0-r4.ebuild)5
4 files changed, 30 insertions, 10 deletions
diff --git a/net-misc/networkmanager/ChangeLog b/net-misc/networkmanager/ChangeLog
index a8617143141e..11cc5fecae46 100644
--- a/net-misc/networkmanager/ChangeLog
+++ b/net-misc/networkmanager/ChangeLog
@@ -1,6 +1,15 @@
# ChangeLog for net-misc/networkmanager
# Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/net-misc/networkmanager/ChangeLog,v 1.127 2012/02/20 09:25:00 tetromino Exp $
+# $Header: /var/cvsroot/gentoo-x86/net-misc/networkmanager/ChangeLog,v 1.128 2012/02/21 23:19:19 tetromino Exp $
+
+*networkmanager-0.9.2.0-r5 (21 Feb 2012)
+
+ 21 Feb 2012; Alexandre Rostovtsev <tetromino@gentoo.org>
+ -networkmanager-0.9.2.0-r4.ebuild, +networkmanager-0.9.2.0-r5.ebuild,
+ files/networkmanager-0.9.2.0-init-provide-net-r1.patch,
+ +files/conf.d.NetworkManager:
+ Make timeout to go inactive at init.d script startup configurable, and reduce
+ it to 1 second by default (bug #405141, thanks to Sylvain Alain).
*networkmanager-0.9.2.0-r4 (20 Feb 2012)
diff --git a/net-misc/networkmanager/files/conf.d.NetworkManager b/net-misc/networkmanager/files/conf.d.NetworkManager
new file mode 100644
index 000000000000..4a99229654fa
--- /dev/null
+++ b/net-misc/networkmanager/files/conf.d.NetworkManager
@@ -0,0 +1,4 @@
+# If NetworkManager does not establish a connection within $INACTIVE_TIMEOUT
+# seconds after starting, the service will be marked as inactive, and it will
+# continue to wait for a connection in background mode.
+INACTIVE_TIMEOUT=1
diff --git a/net-misc/networkmanager/files/networkmanager-0.9.2.0-init-provide-net-r1.patch b/net-misc/networkmanager/files/networkmanager-0.9.2.0-init-provide-net-r1.patch
index dbe563567cd7..0f8befb345ac 100644
--- a/net-misc/networkmanager/files/networkmanager-0.9.2.0-init-provide-net-r1.patch
+++ b/net-misc/networkmanager/files/networkmanager-0.9.2.0-init-provide-net-r1.patch
@@ -1,4 +1,4 @@
-From e99873e7583a3838e0873b1d0b1f9c3dac49f853 Mon Sep 17 00:00:00 2001
+From 705b9978ed914aba87e5a5191a1d0acacaf70a81 Mon Sep 17 00:00:00 2001
From: Alexandre Rostovtsev <tetromino@gentoo.org>
Date: Wed, 1 Feb 2012 05:51:20 -0500
Subject: [PATCH] gentoo: provide net and use inactive status when not
@@ -7,16 +7,16 @@ Subject: [PATCH] gentoo: provide net and use inactive status when not
The status will be reset to started via a dispatcher script on up/down
events. See https://bugs.gentoo.org/show_bug.cgi?id=252137
---
- initscript/Gentoo/NetworkManager.in | 22 +++++++++++++++++++++-
- 1 files changed, 21 insertions(+), 1 deletions(-)
+ initscript/Gentoo/NetworkManager.in | 26 +++++++++++++++++++++++++-
+ 1 files changed, 25 insertions(+), 1 deletions(-)
diff --git a/initscript/Gentoo/NetworkManager.in b/initscript/Gentoo/NetworkManager.in
-index 7db410b..34f19b1 100755
+index 7db410b..1960795 100755
--- a/initscript/Gentoo/NetworkManager.in
+++ b/initscript/Gentoo/NetworkManager.in
-@@ -3,18 +3,38 @@
+@@ -3,18 +3,42 @@
# Distributed under the terms of the GNU General Purpose License v2
- # $Header: /var/cvsroot/gentoo-x86/net-misc/networkmanager/files/networkmanager-0.9.2.0-init-provide-net-r1.patch,v 1.1 2012/02/20 09:24:59 tetromino Exp $
+ # $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 $
+description="NetworkManager daemon. The service is marked as started only \
+when a network connection is established."
@@ -31,14 +31,18 @@ index 7db410b..34f19b1 100755
+ # as started without starting the daemon again
+ yesno "${IN_BACKGROUND}" && return 0
+
++ [ -z "${INACTIVE_TIMEOUT}" ] && INACTIVE_TIMEOUT="1"
++
ebegin "Starting NetworkManager"
start-stop-daemon --start --quiet --pidfile /var/run/NetworkManager.pid \
--exec /usr/sbin/NetworkManager -- --pid-file /var/run/NetworkManager.pid
- eend $?
+ local _retval=$?
+ eend "${_retval}"
-+ if [ "x${_retval}" = 'x0' ]; then
-+ nm-online -t 5 || mark_service_inactive
++ if [ "x${_retval}" = 'x0' ] && ! nm-online -t "${INACTIVE_TIMEOUT}"; then
++ einfo "Marking NetworkManager as inactive. It will automatically be marked"
++ einfo "as started after a network connection has been established."
++ mark_service_inactive
+ fi
+ return "${_retval}"
}
diff --git a/net-misc/networkmanager/networkmanager-0.9.2.0-r4.ebuild b/net-misc/networkmanager/networkmanager-0.9.2.0-r5.ebuild
index cf34fa197bfe..3b8c09882c00 100644
--- a/net-misc/networkmanager/networkmanager-0.9.2.0-r4.ebuild
+++ b/net-misc/networkmanager/networkmanager-0.9.2.0-r5.ebuild
@@ -1,6 +1,6 @@
# Copyright 1999-2012 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/net-misc/networkmanager/networkmanager-0.9.2.0-r4.ebuild,v 1.1 2012/02/20 09:25:00 tetromino Exp $
+# $Header: /var/cvsroot/gentoo-x86/net-misc/networkmanager/networkmanager-0.9.2.0-r5.ebuild,v 1.1 2012/02/21 23:19:19 tetromino Exp $
EAPI="4"
GNOME_ORG_MODULE="NetworkManager"
@@ -165,6 +165,9 @@ src_install() {
insinto /etc/polkit-1/localauthority/10-vendor.d
doins "${FILESDIR}/01-org.freedesktop.NetworkManager.settings.modify.system.pkla"
+ # Default conf.d file
+ newconfd "${FILESDIR}/conf.d.NetworkManager" NetworkManager
+
# Remove useless .la files
find "${D}" -name '*.la' -exec rm -f {} + || die "la file removal failed"
}