/[gentoo-x86]/net-misc/networkmanager/files/10-openrc-status-r1
Gentoo

Contents of /net-misc/networkmanager/files/10-openrc-status-r1

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.2 - (show annotations) (download)
Thu Sep 13 09:54:12 2012 UTC (2 years ago) by tetromino
Branch: MAIN
CVS Tags: HEAD
Changes since 1.1: +0 -0 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 #!/bin/sh
2 # Copyright (c) 2012 Alexandre Rostovtsev
3 # Released under the 2-clause BSD license.
4
5 # Ensures that the NetworkManager OpenRC service is marked as started and
6 # providing net only when it has a successful connection.
7
8 # Ensure rc-service is in PATH
9 PATH="${PATH}:@EPREFIX@/sbin:@EPREFIX@/usr/sbin"
10
11 # Exit if the NetworkManager OpenRC service is not running
12 rc-service NetworkManager status 2>&1 | grep -Eq "status: (starting|started|inactive|stopping)" || exit 0
13
14 # Call rc-service in background mode so that the start/stop functions update
15 # NetworkManager service status to started or inactive instead of actually
16 # starting or stopping the daemon
17 export IN_BACKGROUND=YES
18
19 case "$2" in
20 up) nm-online -t 0 && exec rc-service NetworkManager start ;;
21 down) nm-online -t 0 || exec rc-service NetworkManager stop ;;
22 pre-sleep) exec rc-service NetworkManager stop ;;
23 esac

  ViewVC Help
Powered by ViewVC 1.1.20