diff options
author | William Hubbs <williamh@gentoo.org> | 2012-07-12 15:58:43 -0500 |
---|---|---|
committer | William Hubbs <williamh@gentoo.org> | 2012-07-12 15:58:43 -0500 |
commit | 3c096a7efc4f8cb45938045c6e92bb827f4602cc (patch) | |
tree | 5db3026e1eafecc50d990a0dd104e2ce4f407cf4 | |
parent | remove get_rundir function (diff) | |
download | udev-gentoo-scripts-3c096a7efc4f8cb45938045c6e92bb827f4602cc.tar.gz udev-gentoo-scripts-3c096a7efc4f8cb45938045c6e92bb827f4602cc.tar.bz2 udev-gentoo-scripts-3c096a7efc4f8cb45938045c6e92bb827f4602cc.zip |
disable oldnet hotplug after udev starts
The /run/udev/rules.d directory does not exist until after udev starts,
so we can't disable hotplugging until then.
-rw-r--r-- | init.d/udev | 38 |
1 files changed, 21 insertions, 17 deletions
diff --git a/init.d/udev b/init.d/udev index a054800..d2dd746 100644 --- a/init.d/udev +++ b/init.d/udev @@ -67,6 +67,25 @@ check_kernel() return 0 } +start_pre() +{ + if [ -e /proc/sys/kernel/hotplug ]; then + echo "" >/proc/sys/kernel/hotplug + fi + + # load unix domain sockets if built as module, Bug #221253 + # and not yet loaded, Bug #363549 + if [ ! -e /proc/net/unix ]; then + if ! modprobe unix; then + eerror "Cannot load the unix domain socket module" + fi + fi + + if yesno "${udev_debug}"; then + command_args="${command_args} --debug 2> /run/udevdebug.log" + fi +} + is_service_enabled() { local svc="$1" @@ -78,7 +97,7 @@ is_service_enabled() return 1 } -start_pre() +disable_oldnet_hotplug() { if is_service_enabled network; then # disable network hotplugging @@ -87,22 +106,6 @@ start_pre() echo "# old-style openrc net scripts" >> "${f}" echo "# as we use /etc/init.d/network to set up our network" >> "${f}" fi - - if [ -e /proc/sys/kernel/hotplug ]; then - echo "" >/proc/sys/kernel/hotplug - fi - - # load unix domain sockets if built as module, Bug #221253 - # and not yet loaded, Bug #363549 - if [ ! -e /proc/net/unix ]; then - if ! modprobe unix; then - eerror "Cannot load the unix domain socket module" - fi - fi - - if yesno "${udev_debug}"; then - command_args="${command_args} --debug 2> /run/udevdebug.log" - fi } start_udevmonitor() @@ -173,6 +176,7 @@ display_hotplugged_services() start_post() { + disable_oldnet_hotplug start_udevmonitor populate_dev stop_udevmonitor |