]>
git.ipfire.org Git - people/pmueller/ipfire-2.x.git/blob - src/initscripts/system/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
32 if ! grep -q '[[:space:]]/dev' /proc
/mounts
; then
34 boot_mesg
-n "FAILURE:\n\nKernel has no devtmpfs/mount" ${FAILURE}
35 boot_mesg
-n " support but this is needed for udev."
36 boot_mesg
-n "\n\nAfter you press Enter, this system"
37 boot_mesg
-n " will be halted and powered off."
38 boot_mesg
-n "\n\nPress Enter to continue..." ${INFO}
39 boot_mesg
"" ${NORMAL}
41 /etc
/rc.d
/init.d
/halt stop
44 if ! grep -q '[[:space:]]/dev/shm' /proc
/mounts
; then
46 mount
-t tmpfs tmpfs
/dev
/shm
49 if ! grep -q '[[:space:]]/dev/pts' /proc
/mounts
; then
51 mount
-t devpts devpts
-o gid
=5,mode
=620 /dev
/pts
54 # Start the udev daemon to continually watch for, and act on,
56 boot_mesg
"Starting udev daemon..."
57 loadproc udevd
--daemon
59 # Now traverse /sys in order to "coldplug" devices that have
60 # already been discovered
61 /bin
/udevadm trigger
--action=add
63 # Now wait for udevd to process the uevents we triggered
70 boot_mesg
"Stopping udev daemon..."
77 echo "Usage ${0} {start}"
82 # End $rc_base/init.d/udev