3 # Author: Rolf Eike Beer <eike-hotplug@sf-tec.de>
4 # derived from original RedHat udev init script
5 # based on the SuSE 9.0 template (c) 1995-2002 SuSE Linux AG
8 # and its symbolic link
11 # System startup script for udev
13 # LSB compatible service control script; see http://www.linuxbase.org/spec/
19 # Default-Start: 1 2 3 5
21 # Short-Description: manage user-space device nodes in /udev
22 # Description: Start udev to create the device files for all
23 # devices already present in system when script is
24 # called. All other devices files will be automatically
25 # created when udev is called via /sbin/hotplug.
26 # Requires at least a kernel 2.6 to work properly.
29 # Note on script names:
30 # http://www.linuxbase.org/spec/refspecs/LSB_1.2.0/gLSB/scrptnames.html
31 # A registry has been set up to manage the init script namespace.
32 # http://www.lanana.org/
33 # Please use the names already registered or register one or use a
37 # Check for missing binaries (stale symlinks should not happen)
39 test -x $UDEV_BIN || exit 5
41 # Check for existence of needed config file and read it
42 UDEV_CONFIG=/etc/udev/udev.conf
43 test -r $UDEV_CONFIG || exit 6
46 # Directory where sysfs is mounted
49 # Source LSB init functions
50 . /lib/lsb/init-functions
54 if [ ! -d $SYSFS_DIR ]; then
55 log_failure_msg "${0}: SYSFS_DIR \"$SYSFS_DIR\" not found"
58 if [ ! -d $udev_root ]; then
59 mkdir $udev_root || exit 4
61 # propogate /udev from /sys - we only need this while we do not
62 # have initramfs and an early user-space with which to do early
64 echo -n "Creating initial udev device nodes: "
71 echo -n "Stopping udev: "
81 echo -n "Reload udev "
89 echo -n "Checking for udev root directory: "
90 if [ -d $udev_root ]; then
93 log_warning_msg "not found"
98 echo "Usage: $0 {start|stop|status|restart|force-reload|reload}"