diff options
author | David P <megver83@parabola.nu> | 2021-07-06 19:26:48 -0400 |
---|---|---|
committer | David P <megver83@parabola.nu> | 2021-07-06 19:26:48 -0400 |
commit | 19d5e1a2cd2bb2844b93b73dd09cf2fa6c4df636 (patch) | |
tree | 08c923a9802cb0f5d42e43237da5ca261f5ae107 /nonsystemd/networkmanager/10-openrc-status | |
parent | 441462c7d6194d4ca23346530962258b8acf2ca9 (diff) | |
download | abslibre-19d5e1a2cd2bb2844b93b73dd09cf2fa6c4df636.tar.gz abslibre-19d5e1a2cd2bb2844b93b73dd09cf2fa6c4df636.tar.bz2 abslibre-19d5e1a2cd2bb2844b93b73dd09cf2fa6c4df636.zip |
updpkg: nonsystemd/networkmanager 1.32.2-1.nonsystemd1
Signed-off-by: David P <megver83@parabola.nu>
Diffstat (limited to 'nonsystemd/networkmanager/10-openrc-status')
-rw-r--r-- | nonsystemd/networkmanager/10-openrc-status | 23 |
1 files changed, 12 insertions, 11 deletions
diff --git a/nonsystemd/networkmanager/10-openrc-status b/nonsystemd/networkmanager/10-openrc-status index ba4a50f17..f04658621 100644 --- a/nonsystemd/networkmanager/10-openrc-status +++ b/nonsystemd/networkmanager/10-openrc-status @@ -6,12 +6,12 @@ # providing net only when it has a successful connection. if [ ! -e "/run/openrc/softlevel" ]; then - # OpenRC is not running - exit 0 + # OpenRC is not running + exit 0 fi # Ensure rc-service is in PATH -PATH="${PATH}:/usr/bin:/usr/bin" +PATH="${PATH}:/usr/bin:/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 @@ -19,17 +19,18 @@ rc-service NetworkManager status 2>&1 | grep -Eq "status: (starting|started|inac # 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 ;; + 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: |