3 # udev This is a minimal non-LSB version of a UDEV startup script. It
4 # was derived by stripping down the udev-058 LSB version for use
5 # with buildroot on embedded hardware using Linux 2.6.34+ kernels.
7 # You may need to customize this for your system's resource limits
8 # (including startup time!) and administration. For example, if
9 # your early userspace has a custom initramfs or initrd you might
10 # need /dev much earlier; or without hotpluggable busses (like USB,
11 # PCMCIA, MMC/SD, and so on) your /dev might be static after boot.
13 # This script assumes your system boots right into the eventual root
14 # filesystem, and that init runs this udev script before any programs
15 # needing more device nodes than the bare-bones set -- /dev/console,
16 # /dev/zero, /dev/null -- that's needed to boot and run this script.
19 # Check for missing binaries
21 test -x $UDEV_BIN ||
exit 5
23 # Check for config file and read it
24 UDEV_CONFIG
=/etc
/udev
/udev.conf
25 test -r $UDEV_CONFIG ||
exit 6
30 printf "Populating ${udev_root:-/dev} using udev: "
31 printf '\000\000\000\000' > /proc
/sys
/kernel
/hotplug
32 $UDEV_BIN -d ||
(echo "FAIL" && exit 1)
33 udevadm trigger
--type=subsystems
--action=add
34 udevadm trigger
--type=devices
--action=add
35 udevadm settle
--timeout=30 ||
echo "udevadm settle failed"
39 # Stop execution of events
40 udevadm control
--stop-exec-queue
44 echo "Usage: $0 {start|stop}"