aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSamuli Suominen <ssuominen@gentoo.org>2014-03-07 09:34:48 -0800
committerRobin H. Johnson <robbat2@gentoo.org>2014-03-07 09:36:03 -0800
commitc10f1f89c55d075bf5be50b6b75431252cf5952e (patch)
tree1c1abc8602a28957779b2704562c13af156a6b22
parentBump to 0.2.1, only changes are buildsystem. (diff)
downloadnetifrc-c10f1f89c55d075bf5be50b6b75431252cf5952e.tar.gz
netifrc-c10f1f89c55d075bf5be50b6b75431252cf5952e.tar.bz2
netifrc-c10f1f89c55d075bf5be50b6b75431252cf5952e.zip
udev_helper: do not run with newnet
If the system is using newnet, then we should not run to fire the netifrc triggers. X-Gentoo-Bug: 503530 Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
-rw-r--r--udev_helper/net.sh14
1 files changed, 14 insertions, 0 deletions
diff --git a/udev_helper/net.sh b/udev_helper/net.sh
index af61870..88aee59 100644
--- a/udev_helper/net.sh
+++ b/udev_helper/net.sh
@@ -16,6 +16,20 @@ case ${IFACE} in
exit 0 ;;
esac
+is_service_enabled() {
+ local svc="$1"
+ [ ! -e "/etc/init.d/${svc}" ] && return 1
+ [ -e "/etc/runlevels/boot/${svc}" ] && return 0
+ [ -e "/etc/runlevels/default/${svc}" ] && return 0
+ [ -e "/etc/runlevels/sysinit/${svc}" ] && return 0
+ return 1
+}
+
+# stop here if OpenRC's so called "newnet" is enabled, bug #503530
+if is_service_enabled network; then
+ exit 0
+fi
+
# stop here if coldplug is disabled, Bug #206518
if [ "${do_not_run_plug_service}" = 1 ]; then
exit 0