commit:     b1a6abadd8c4ca2146ed6b08d53e46d35d320e17
Author:     Mike Gilbert <floppymaster <AT> gmail <DOT> com>
AuthorDate: Fri Apr 22 17:45:11 2016 +0000
Commit:     Robin H. Johnson <robbat2 <AT> gentoo <DOT> org>
CommitDate: Fri Apr 22 17:45:11 2016 +0000
URL:        https://gitweb.gentoo.org/proj/netifrc.git/commit/?id=b1a6abad

udev: Bail out early if not running openrc (#19)

Bug: https://bugs.gentoo.org/580846

 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