chiark / gitweb /
[PATCH] don't call the hotplug scripts with a test run
[elogind.git] / etc / init.d / udev
index 3f1430271b53057e9181a316a43d05d25592bcd1..8726090d44f5374d12ba40c9e0f3b4fe2e43406f 100644 (file)
@@ -1,4 +1,4 @@
-#! /bin/bash
+#! /bin/sh
 #
 # udev init script to setup /udev
 #
@@ -12,6 +12,7 @@
 prog=udev
 sysfs_dir=/sys
 bin=/sbin/udev
+udevd=/sbin/udevd
 udev_root=/udev
 
 run_udev () {
@@ -78,8 +79,8 @@ case "$1" in
        fi
 
        # remove the database if it is there as we always want to start fresh
-       if [ -f $udev_root/.udev.tdb ]; then
-               rm -f $udev_root/.udev.tdb
+       if [ -f $udev_root/.udevdb ]; then
+               rm -rf $udev_root/.udevdb
        fi
 
        # propogate /udev from /sys - we only need this while we do not
@@ -89,6 +90,11 @@ case "$1" in
        echo -n $"Creating initial udev device nodes:"
        run_udev
        make_extra_nodes
+
+       # We want to start udevd ourselves if it isn't already running.  This
+       # lets udevd run at a sane nice level...
+       $udevd &
+
        success /bin/true
        echo
        touch /var/lock/subsys/udev