diff options
author | William Hubbs <williamh@gentoo.org> | 2013-01-27 12:55:25 -0600 |
---|---|---|
committer | William Hubbs <williamh@gentoo.org> | 2013-01-27 12:55:25 -0600 |
commit | 72685c836e468e6de8db0da83a32dbde448c4d22 (patch) | |
tree | 783a7ee7a0bfaa3480c0c7048b5709a3498542a0 | |
parent | Fix population of /run/udev/rules.d for newnet (diff) | |
download | udev-gentoo-scripts-72685c836e468e6de8db0da83a32dbde448c4d22.tar.gz udev-gentoo-scripts-72685c836e468e6de8db0da83a32dbde448c4d22.tar.bz2 udev-gentoo-scripts-72685c836e468e6de8db0da83a32dbde448c4d22.zip |
move disable_oldnet_hotplug above start_pre
This function is used in start_pre, so move it to reflect that. Code is
easier to follow if it is defined before it is used.
-rw-r--r-- | init.d/udev | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/init.d/udev b/init.d/udev index 0a95873..193adf7 100644 --- a/init.d/udev +++ b/init.d/udev @@ -70,6 +70,19 @@ check_kernel() return 0 } +disable_oldnet_hotplug() +{ + if is_service_enabled network; then + # disable network hotplugging + local d="/run/udev/rules.d" + mkdir -p "${d}" + local f="${d}/90-network.rules" + echo "# This file disables network hotplug events calling" >> "${f}" + echo "# old-style openrc net scripts" >> "${f}" + echo "# as we use /etc/init.d/network to set up our network" >> "${f}" + fi +} + start_pre() { check_kernel || return 1 @@ -118,19 +131,6 @@ is_service_enabled() return 1 } -disable_oldnet_hotplug() -{ - if is_service_enabled network; then - # disable network hotplugging - local d="/run/udev/rules.d" - mkdir -p "${d}" - local f="${d}/90-network.rules" - echo "# This file disables network hotplug events calling" >> "${f}" - echo "# old-style openrc net scripts" >> "${f}" - echo "# as we use /etc/init.d/network to set up our network" >> "${f}" - fi -} - start_udevmonitor() { yesno "${udev_monitor}" || return 0 |