aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Gilbert <floppym@gentoo.org>2016-04-22 12:55:13 -0400
committerIan Stakenvicius <axs@gentoo.org>2016-04-22 13:16:14 -0400
commit3a1a01b5dc0b58386fd2a12a3f6218acce53e6f7 (patch)
treed1a2c8b383911f80276f82bc3463588c31311305 /udev_helper
parenthsr: Missed $iface in variable names. (diff)
downloadnetifrc-3a1a01b5dc0b58386fd2a12a3f6218acce53e6f7.tar.gz
netifrc-3a1a01b5dc0b58386fd2a12a3f6218acce53e6f7.tar.bz2
netifrc-3a1a01b5dc0b58386fd2a12a3f6218acce53e6f7.zip
udev: Bail out early if not running openrc
Bug: https://bugs.gentoo.org/580846 Closes: https://github.com/gentoo/netifrc/pull/19 Signed-off-by: Ian Stakenvicius <axs@gentoo.org>
Diffstat (limited to 'udev_helper')
-rw-r--r--udev_helper/net.sh5
1 files changed, 5 insertions, 0 deletions
diff --git a/udev_helper/net.sh b/udev_helper/net.sh
index 88aee59..85b304b 100644
--- a/udev_helper/net.sh
+++ b/udev_helper/net.sh
@@ -10,6 +10,11 @@ ACTION=$2
SCRIPT=/etc/init.d/net.$IFACE
+# make sure openrc is managing services
+if [ ! -d /run/openrc ]; then
+ exit 0
+fi
+
# ignore interfaces that are registered after being "up" (?)
case ${IFACE} in
ppp*|ippp*|isdn*|plip*|lo*|irda*|dummy*|ipsec*|tun*|tap*|br*)