3 # LinuxFromScratch udev init script
4 # derived from original RedHat udev init script
5 # 2003, 2004 by Michael Buesch <mbuesch@freenet.de>
8 source /etc/sysconfig/rc
10 source /etc/udev/udev.conf
18 # handle block devices and their partitions
19 for i in ${sysfs_dir}/block/*; do
21 export DEVPATH=${i#${sysfs_dir}}
24 # add each partition, on each device
26 if [ -f $j/dev ]; then
27 export DEVPATH=${j#${sysfs_dir}}
32 # all other device classes
33 for i in ${sysfs_dir}/class/*; do
35 if [ -f $j/dev ]; then
36 export DEVPATH=${j#${sysfs_dir}}
37 CLASS=`echo ${i#${sysfs_dir}} | \
38 cut --delimiter='/' --fields=3-`
48 echo "Creating initial udev device nodes ..."
49 if [ ! -d $sysfs_dir ]; then
50 echo "sysfs_dir $sysfs_dir does not exist!"
54 if [ ! -d $udev_root ]; then
62 # propogate /udev from /sys - we only need this while we do not
63 # have initramfs and an early user-space with which to do early
70 echo "Removing udev device nodes ..."
84 if [ -d $udev_dir ]; then
85 echo "the udev device node directory exists"
87 echo "the udev device node directory does not exist"
91 echo "Usage: $0 {start|stop|restart|status}"