2 # Begin $rc_base/init.d/udev - Udev cold-plugging script
4 # Written by Zack Winkles - winkie@linuxfromscratch.org
9 # Assure that sysfs is mounted and that udev is present.
10 [ -d /sys
/block
-a -x /sbin
/udev
] ||
exit 0
12 # Create some things that sysfs does not, and should not export for us. Feel
13 # free to add devices to this list.
15 ln -s /proc
/self
/fd
/dev
/fd
16 ln -s /proc
/self
/fd
/0 /dev
/stdin
17 ln -s /proc
/self
/fd
/1 /dev
/stdout
18 ln -s /proc
/self
/fd
/2 /dev
/stderr
19 ln -s /proc
/kcore
/dev
/core
26 # When the hotplug package isn't installed, make sure that udev
27 # still gets hotplug events.
28 if [ ! -x /sbin
/hotplug
]; then
29 echo /sbin
/udev
> /proc
/sys
/kernel
/hotplug
32 echo "Populating /dev with device nodes..."
34 # Mount a temporary file system over /dev, so that any devices
35 # made or removed during this boot don't affect the next one.
36 # The reason we don't write to mtab is because we don't ever
37 # want /dev to be unavailable (such as by `umount -a').
38 mount
-n -t ramfs ramfs
/dev
40 # Populate /dev with all the devices that are already available,
41 # and save it's status so we can report failures.
44 # Now, create some required files/directories/devices that sysfs
45 # doesn't export for us.
48 # When reporting the status, base it on the success or failure
49 # of the `udevstart' command, since that's the most important.
54 echo "Usage $0 {start}"
59 # End $rc_base/init.d/udev