* [gentoo-commits] gentoo-x86 commit in net-misc/networkmanager/files: 10-openrc-status-r3
@ 2012-10-26 22:57 Alexandre Rostovtsev (tetromino)
0 siblings, 0 replies; only message in thread
From: Alexandre Rostovtsev (tetromino) @ 2012-10-26 22:57 UTC (permalink / raw
To: gentoo-commits
tetromino 12/10/26 22:57:57
Added: 10-openrc-status-r3
Log:
Version bump with various bugfixes. Update dispatcher script to correctly detect openrc service status at boot (bug #436044, thanks to cyberbat). Update license.
(Portage version: 2.2.0_alpha141/cvs/Linux x86_64, signed Manifest commit with key CF0ADD61)
Revision Changes Path
1.1 net-misc/networkmanager/files/10-openrc-status-r3
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-misc/networkmanager/files/10-openrc-status-r3?rev=1.1&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-misc/networkmanager/files/10-openrc-status-r3?rev=1.1&content-type=text/plain
Index: 10-openrc-status-r3
===================================================================
#!/bin/sh
# Copyright (c) 2012 Alexandre Rostovtsev
# Released under the 2-clause BSD license.
# Ensures that the NetworkManager OpenRC service is marked as started and
# providing net only when it has a successful connection.
# Ensure rc-service is in PATH
PATH="${PATH}:@EPREFIX@/sbin:@EPREFIX@/usr/sbin"
# Exit if the NetworkManager OpenRC service is not running
rc-service NetworkManager status 2>&1 | grep -Eq "status: (starting|started|inactive|stopping)" || exit 0
# Call rc-service in background mode so that the start/stop functions update
# NetworkManager service status to started or inactive instead of actually
# starting or stopping the daemon
export IN_BACKGROUND=YES
case "$2" in
up) nm-online -t 0 -x &&
! rc-service NetworkManager status 2>&1 | grep -q started &&
exec rc-service NetworkManager start ;;
down) nm-online -t 0 -x ||
rc-service NetworkManager status 2>&1 | grep -q stopped ||
exec rc-service NetworkManager stop ;;
pre-sleep) rc-service NetworkManager status 2>&1 | grep -q stopped ||
exec rc-service NetworkManager stop ;;
esac
exit 0
# vim: set ts=4:
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2012-10-26 22:58 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-10-26 22:57 [gentoo-commits] gentoo-x86 commit in net-misc/networkmanager/files: 10-openrc-status-r3 Alexandre Rostovtsev (tetromino)
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox