SmartAudio/package/utils/eudev/udev

42 lines
1.4 KiB
Plaintext
Raw Permalink Normal View History

2018-07-13 01:31:50 +00:00
#!/bin/sh /etc/rc.common
#
# 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.34+ 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.
START=80
STOP=80
UDEV_BIN=/sbin/udevd
# Check for config file and read it
UDEV_CONFIG=/etc/udev/udev.conf
start(){
test -r $UDEV_CONFIG || exit 6
. $UDEV_CONFIG
printf "Populating ${udev_root:-/dev} using udev: "
printf '\000\000\000\000' > /proc/sys/kernel/hotplug
$UDEV_BIN -d || (echo "FAIL" && exit 1)
udevadm trigger --type=subsystems --action=add
udevadm trigger --type=devices --action=add
udevadm settle --timeout=30 || echo "udevadm settle failed"
echo "done"
}
stop(){
udevadm control --stop-exec-queue
killall udevd
}