chiark / gitweb /
[PATCH] avoid building klibc test programs and pass SUBDIRS= to klibc clean
[elogind.git] / etc / init.d / udev.init.lfs
index c7383690813f877e159a1a54cf0b420c6b1bf461..d4f64062b82437e93640f9ee5d2de4a9d42bb906 100644 (file)
@@ -5,43 +5,11 @@
 #  2003, 2004 by Michael Buesch <mbuesch@freenet.de>
 #
 
-source /etc/sysconfig/rc
-source $rc_functions
-source /etc/udev/udev.conf
+. /etc/sysconfig/rc
+. $rc_functions
+. /etc/udev/udev.conf
 
 sysfs_dir="/sys"
-bin="/sbin/udev"
-
-
-run_udev ()
-{
-       # handle block devices and their partitions
-       for i in ${sysfs_dir}/block/*; do
-               # add each drive
-               export DEVPATH=${i#${sysfs_dir}}
-               $bin block &
-
-               # add each partition, on each device
-               for j in $i/*; do
-                       if [ -f $j/dev ]; then
-                               export DEVPATH=${j#${sysfs_dir}}
-                               $bin block &
-                       fi
-               done
-       done
-       # all other device classes
-       for i in ${sysfs_dir}/class/*; do
-               for j in $i/*; do
-                       if [ -f $j/dev ]; then
-                               export DEVPATH=${j#${sysfs_dir}}
-                               CLASS=`echo ${i#${sysfs_dir}} | \
-                                       cut --delimiter='/' --fields=3-`
-                               $bin $CLASS &
-                       fi
-               done
-       done
-       return 0
-}
 
 case "$1" in
        start)
@@ -62,14 +30,11 @@ case "$1" in
                # propogate /udev from /sys - we only need this while we do not
                # have initramfs and an early user-space with which to do early
                # device bring up
-               export ACTION=add
-               run_udev
+               udevstart
                evaluate_retval
                ;;
        stop)
-               echo "Removing udev device nodes ..."
-               export ACTION=remove
-               run_udev
+               echo "Stopping udev ..."
                evaluate_retval
                ;;
        reload)