]>
git.ipfire.org Git - people/teissler/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
"Mount /var/run..."
21 mount
-n -t tmpfs tmpfs
/var
/run
-o size
=2M
23 boot_mesg
"Populating /dev with device nodes..."
24 if ! grep -q '[[:space:]]sysfs' /proc
/mounts
; then
26 boot_mesg
-n "FAILURE:\n\nUnable to create" ${FAILURE}
27 boot_mesg
-n " devices without a SysFS filesystem"
28 boot_mesg
-n "\n\nAfter you press Enter, this system"
29 boot_mesg
-n " will be halted and powered off."
30 boot_mesg
-n "\n\nPress Enter to continue..." ${INFO}
31 boot_mesg
"" ${NORMAL}
33 /etc
/rc.d
/init.d
/halt stop
35 if ! grep -q '[[:space:]]/dev' /proc
/mounts
; then
37 boot_mesg
-n "FAILURE:\n\nKernel has no devtmpfs/mount" ${FAILURE}
38 boot_mesg
-n " support but this is needed for udev."
39 boot_mesg
-n "\n\nAfter you press Enter, this system"
40 boot_mesg
-n " will be halted and powered off."
41 boot_mesg
-n "\n\nPress Enter to continue..." ${INFO}
42 boot_mesg
"" ${NORMAL}
44 /etc
/rc.d
/init.d
/halt stop
47 # Udev handles uevents itself, so we don't need to have
48 # the kernel call out to any binary in response to them
49 echo > /proc
/sys
/kernel
/hotplug
51 # Copy static device nodes to /dev
52 cp -a /lib
/udev
/devices
/* /dev
54 # Start the udev daemon to continually watch for, and act on,
58 # Now traverse /sys in order to "coldplug" devices that have
59 # already been discovered
62 # Now wait for udevd to process the uevents we triggered
69 echo "Usage ${0} {start}"
74 # End $rc_base/init.d/udev