]>
git.ipfire.org Git - people/pmueller/ipfire-2.x.git/blob - src/initscripts/init.d/udev
2 ########################################################################
3 # Begin $rc_base/init.d/udev
5 # Description : Udev cold-plugging script
7 # Authors : Zack Winkles, Alexander E. Patrakov
13 ########################################################################
20 boot_mesg
"Populating /dev with device nodes..."
21 if ! grep -q '[[:space:]]sysfs' /proc
/mounts
; then
23 boot_mesg
-n "FAILURE:\n\nUnable to create" ${FAILURE}
24 boot_mesg
-n " devices without a SysFS filesystem"
25 boot_mesg
-n "\n\nAfter you press Enter, this system"
26 boot_mesg
-n " will be halted and powered off."
27 boot_mesg
-n "\n\nPress Enter to continue..." ${INFO}
28 boot_mesg
"" ${NORMAL}
30 /etc
/rc.d
/init.d
/halt stop
33 # Mount a temporary file system over /dev, so that any devices
34 # made or removed during this boot don't affect the next one.
35 # The reason we don't write to mtab is because we don't ever
36 # want /dev to be unavailable (such as by `umount -a').
37 mount
-n -t tmpfs tmpfs
/dev
-o mode
=755
38 if [ ${?} != 0 ]; then
40 boot_mesg
-n "FAILURE:\n\nCannot mount a tmpfs" ${FAILURE}
41 boot_mesg
-n " onto /dev, this system will be halted."
42 boot_mesg
-n "\n\nAfter you press Enter, this system"
43 boot_mesg
-n " will be halted and powered off."
44 boot_mesg
-n "\n\nPress Enter to continue..." ${INFO}
45 boot_mesg
"" ${NORMAL}
47 /etc
/rc.d
/init.d
/halt stop
50 # Udev handles uevents itself, so we don't need to have
51 # the kernel call out to any binary in response to them
52 echo > /proc
/sys
/kernel
/hotplug
54 # Copy static device nodes to /dev
55 cp -a /lib
/udev
/devices
/* /dev
57 # Start the udev daemon to continually watch for, and act on,
61 # Now traverse /sys in order to "coldplug" devices that have
62 # already been discovered
65 # Now wait for udevd to process the uevents we triggered
72 echo "Usage ${0} {start}"
77 # End $rc_base/init.d/udev