diff options
-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 |