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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.2 - (hide annotations) (download)
Tue Aug 14 04:47:01 2012 UTC (2 years, 1 month ago) by tetromino
Branch: MAIN
CVS Tags: HEAD
Changes since 1.1: +0 -0 lines
FILE REMOVED
Add 0.9.4.0-r7 with systemd USE flag; systemd USE flag will be disabled in 0.9.4.0-r6 to allow stabilization. Drop some old ebuilds.

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

1 tetromino 1.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     # Exit if no valid interface name given
9     if [ -z "$1" -o "x$1" = "xnone" ]; then
10     exit
11     fi
12    
13     # Ensure rc-service is in PATH
14     PATH="${PATH}:@EPREFIX@/sbin:@EPREFIX@/usr/sbin"
15    
16     # Exit if the NetworkManager OpenRC service is not running
17     rc-service NetworkManager status 2>&1 | grep -Eq "status: (starting|started|inactive|stopping)" || exit 0
18    
19     # Call rc-service in background mode so that the start/stop functions update
20     # NetworkManager service status to started or inactive instead of actually
21     # starting or stopping the daemon
22     export IN_BACKGROUND=YES
23    
24     case "$2" in
25     up|vpn-up) exec rc-service NetworkManager start ;;
26     down|vpn-down) exec rc-service NetworkManager stop ;;
27     esac

  ViewVC Help
Powered by ViewVC 1.1.20