initscripts: Install udev init script
This commit is contained in:
parent
f61632d2cc
commit
c2f32689e7
|
|
@ -0,0 +1,36 @@
|
|||
#!/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
|
||||
|
|
@ -21,6 +21,7 @@ SRC_URI = "file://functions \
|
|||
file://reboot \
|
||||
file://single \
|
||||
file://sendsigs \
|
||||
file://udev \
|
||||
file://urandom \
|
||||
file://rmnologin.sh \
|
||||
file://umountnfs.sh \
|
||||
|
|
@ -67,6 +68,7 @@ do_install () {
|
|||
install -m 0755 ${WORKDIR}/rmnologin.sh ${D}${sysconfdir}/init.d
|
||||
install -m 0755 ${WORKDIR}/sendsigs ${D}${sysconfdir}/init.d
|
||||
install -m 0755 ${WORKDIR}/single ${D}${sysconfdir}/init.d
|
||||
install -m 0755 ${WORKDIR}/udev ${D}${sysconfdir}/init.d
|
||||
install -m 0755 ${WORKDIR}/umountnfs.sh ${D}${sysconfdir}/init.d
|
||||
install -m 0755 ${WORKDIR}/urandom ${D}${sysconfdir}/init.d
|
||||
install -m 0755 ${WORKDIR}/save-rtc.sh ${D}${sysconfdir}/init.d
|
||||
|
|
@ -95,6 +97,7 @@ do_install () {
|
|||
ln -sf ../init.d/save-rtc.sh ${D}${sysconfdir}/rc0.d/S25save-rtc.sh
|
||||
ln -sf ../init.d/save-rtc.sh ${D}${sysconfdir}/rc6.d/S25save-rtc.sh
|
||||
ln -sf ../init.d/banner.sh ${D}${sysconfdir}/rcS.d/S02banner.sh
|
||||
ln -sf ../init.d/udev ${D}${sysconfdir}/rcS.d/S04udev
|
||||
ln -sf ../init.d/mountall.sh ${D}${sysconfdir}/rcS.d/S35mountall.sh
|
||||
ln -sf ../init.d/hostname.sh ${D}${sysconfdir}/rcS.d/S39hostname.sh
|
||||
ln -sf ../init.d/dbus ${D}${sysconfdir}/rcS.d/S40dbus
|
||||
|
|
|
|||
Loading…
Reference in New Issue