37 lines
1.0 KiB
Bash
37 lines
1.0 KiB
Bash
#!/bin/sh -e
|
|
|
|
### BEGIN INIT INFO
|
|
# Provides: udev
|
|
# Required-Start:
|
|
# Required-Stop:
|
|
# Default-Start: S
|
|
# Default-Stop:
|
|
# Short-Description: Start udevd, populate /dev and load drivers.
|
|
### END INIT INFO
|
|
|
|
export TZ=/etc/localtime
|
|
|
|
kill_udevd() {
|
|
if [ -x /sbin/pidof ]; then
|
|
pid=`/sbin/pidof -x udevd`
|
|
[ -n "$pid" ] && kill $pid
|
|
fi
|
|
}
|
|
|
|
export ACTION=add
|
|
# propagate /dev from /sys
|
|
echo "Starting udev"
|
|
|
|
# make_extra_nodes
|
|
kill_udevd > /dev/null 2>&1
|
|
|
|
# trigger the sorted events
|
|
echo -e '\000\000\000\000' > /proc/sys/kernel/hotplug
|
|
/sbin/udevd -d
|
|
|
|
/sbin/udevadm control --env STARTUP=1
|
|
/sbin/udevadm trigger --subsystem-nomatch=tty --subsystem-nomatch=mem --subsystem-nomatch=vc --subsystem-nomatch=vtconsole --subsystem-nomatch=misc --subsystem-nomatch=dcon --subsystem-nomatch=pci_bus --subsystem-nomatch=graphics --subsystem-nomatch=backlight --subsystem-nomatch=video4linux --subsystem-nomatch=platform --action=add
|
|
(/sbin/udevadm settle --timeout=8; /sbin/udevadm control --env STARTUP=)&
|
|
|
|
exit 0
|