3 # random init script to setup /udev
5 # chkconfig: 2345 20 80
6 # description: manage user-space device nodes in /udev
8 . /etc/rc.d/init.d/functions
16 # handle block devices and their partitions
17 for i in ${sysfs_dir}/block/*; do
19 export DEVPATH=${i#${sysfs_dir}}
22 # add each partition, on each device
24 if [ -f $j/dev ]; then
25 export DEVPATH=${j#${sysfs_dir}}
30 # all other device classes
31 for i in ${sysfs_dir}/class/*; do
33 if [ -f $j/dev ]; then
34 export DEVPATH=${j#${sysfs_dir}}
35 CLASS=`echo ${i#${sysfs_dir}} | \
36 cut --delimiter='/' --fields=3-`
46 if [ ! -d $sysfs_dir ]; then
49 if [ ! -d $udev_root ]; then
52 # propogate /udev from /sys - we only need this while we do not
53 # have initramfs and an early user-space with which to do early
55 action "Creating initial udev device nodes: " /bin/true
61 action "Removing udev device nodes: " /bin/true
66 if [ -d $udev_root ]; then
67 echo "the udev device node directory exists"
69 echo "the udev device node directory does not exist"
80 echo "Usage: $0 {start|stop|status|restart}"