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 if [ ! -d $udev_dir ]; then
19 if [ ! -d $sysfs_dir ]; then
22 # propogate /udev from /sys - we only need this while we do not
23 # have initramfs and an early user-space with which to do early
25 action "Creating initial udev device nodes: " /bin/true
28 for i in ${sysfs_dir}/class/tty/*; do
29 export DEVPATH="/"`echo $i | cut --delimiter='/' --fields=3-`
32 # add block devices and their partitions
33 for i in ${sysfs_dir}/block/*; do
34 export DEVPATH="/"`echo $i | cut --delimiter='/' --fields=3-`
37 if [ -f $j/dev ]; then
38 export DEVPATH="/"`echo $j | \
39 cut --delimiter='/' --fields=3-`
44 # TODO: add other device classes
48 if [ $udev_dir -a "$udev_dir" != "/" ]; then
54 if [ -d $udev_dir ]; then
55 echo "the udev device node directory exists"
57 echo "the udev device node directory does not exist"
64 echo "Usage: $0 {start|stop|status}"