commit:     3a1a01b5dc0b58386fd2a12a3f6218acce53e6f7
Author:     Mike Gilbert <floppym <AT> gentoo <DOT> org>
AuthorDate: Fri Apr 22 16:55:13 2016 +0000
Commit:     Ian Stakenvicius <axs <AT> gentoo <DOT> org>
CommitDate: Fri Apr 22 17:16:14 2016 +0000
URL:        https://gitweb.gentoo.org/proj/netifrc.git/commit/?id=3a1a01b5

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 <AT> gentoo.org>

 udev_helper/net.sh | 5 +++++
 1 file changed, 5 insertions(+)

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*)

Reply via email to