start_udev revision 286903679a6cd4cfa9f5e7eed49f0bb8f059109e
#
# start_udev
#
# script to initialize /dev by using udev.
#
# Copyright (C) 2004 Greg Kroah-Hartman <greg@kroah.com>
#
# Released under the GPL v2 only.
#
# This needs to be run at the earliest possible point in the boot
# process.
#
# Based on the udev init.d script
#
# Thanks go out to the Gentoo developers for proving
# that this is possible to do.
#
# Yes, it's very verbose, feel free to turn off all of the echo calls,
# they were there to make me feel better that everything was working
# properly during development...
#
# handle block devices and their partitions
# add each drive
export DEVPATH=${i#${sysfs_dir}}
echo "$DEVPATH"
# add each partition, on each device
for j in $i/*; do
export DEVPATH=${j#${sysfs_dir}}
echo "$DEVPATH"
fi
done
done
# all other device classes
for j in $i/*; do
export DEVPATH=${j#${sysfs_dir}}
echo "$DEVPATH"
fi
done
done
return 0
}
# there are a few things that sysfs does not export for us.
# these things go here (and remember to remove them in
# remove_extra_nodes()
#
# Thanks to Gentoo for the initial list of these.
}
# don't use udev if sysfs is not mounted.
if [ ! -d $sysfs_dir/block ]; then
exit 1
fi
echo "mounting... ramfs at $udev_root"
# propogate /udev from /sys
export UDEV_NO_SLEEP=1
echo "Creating initial udev device nodes:"
echo "making extra nodes"
echo "udev startup is finished!"
exit 0