2005-06-09 13:16:29 +02:00
|
|
|
#!/bin/sh
|
|
|
|
#
|
|
|
|
# udev This is a minimal non-LSB version of a UDEV startup script. It
|
|
|
|
# was derived by stripping down the udev-058 LSB version for use
|
|
|
|
# with buildroot on embedded hardware using Linux 2.6.12+ kernels.
|
|
|
|
#
|
|
|
|
# You may need to customize this for your system's resource limits
|
|
|
|
# (including startup time!) and administration. For example, if
|
|
|
|
# your early userspace has a custom initramfs or initrd you might
|
|
|
|
# need /dev much earlier; or without hotpluggable busses (like USB,
|
|
|
|
# PCMCIA, MMC/SD, and so on) your /dev might be static after boot.
|
|
|
|
#
|
|
|
|
# This script assumes your system boots right into the eventual root
|
|
|
|
# filesystem, and that init runs this udev script before any programs
|
|
|
|
# needing more device nodes than the bare-bones set -- /dev/console,
|
|
|
|
# /dev/zero, /dev/null -- that's needed to boot and run this script.
|
|
|
|
#
|
|
|
|
|
|
|
|
# Check for missing binaries
|
2007-01-14 01:59:10 +01:00
|
|
|
UDEV_BIN=/sbin/udevd
|
2005-06-09 13:16:29 +02:00
|
|
|
test -x $UDEV_BIN || exit 5
|
|
|
|
UDEVSTART_BIN=/sbin/udevstart
|
|
|
|
test -x $UDEVSTART_BIN || exit 5
|
|
|
|
|
|
|
|
# Check for config file and read it
|
|
|
|
UDEV_CONFIG=/etc/udev/udev.conf
|
|
|
|
test -r $UDEV_CONFIG || exit 6
|
|
|
|
. $UDEV_CONFIG
|
|
|
|
|
|
|
|
case "$1" in
|
|
|
|
start)
|
2008-12-08 14:41:59 +01:00
|
|
|
mknod -m 0666 /dev/null c 1 3
|
2007-01-14 01:59:10 +01:00
|
|
|
echo -n "Populating $udev_root using udev: "
|
|
|
|
echo -e '\000\000\000\000' > /proc/sys/kernel/hotplug
|
|
|
|
$UDEV_BIN -d || (echo "FAIL" && exit 1)
|
2005-06-09 13:16:29 +02:00
|
|
|
$UDEVSTART_BIN || (echo "FAIL" && exit 1)
|
2007-01-14 01:59:10 +01:00
|
|
|
echo "done"
|
|
|
|
;;
|
2005-06-09 13:16:29 +02:00
|
|
|
stop)
|
2007-01-14 01:59:10 +01:00
|
|
|
# Stop execution of events
|
|
|
|
udevcontrol stop_exec_queue
|
|
|
|
killall udevd
|
|
|
|
;;
|
2005-06-09 13:16:29 +02:00
|
|
|
*)
|
2007-01-14 01:59:10 +01:00
|
|
|
echo "Usage: $0 {start|stop}"
|
|
|
|
exit 1
|
|
|
|
;;
|
2005-06-09 13:16:29 +02:00
|
|
|
esac
|
2007-01-14 01:59:10 +01:00
|
|
|
|
|
|
|
|
|
|
|
exit 0
|