--- /dev/null
+#!/bin/sh -e
+
+### BEGIN INIT INFO
+# Provides: udev-cache
+# Required-Start: mountall
+# Required-Stop:
+# Default-Start: S
+# Default-Stop:
+# Short-Description: cache /dev to speedup the udev next boot
+### END INIT INFO
+
+[ -d /sys/class ] || exit 1
+[ -r /proc/mounts ] || exit 1
+[ -x /sbin/udevd ] || exit 1
+
+if [ ! -e /etc/dev.tar ]; then
+ (cd /; tar cf /etc/dev.tar /dev)
+fi
+
+exit 0
else
/sbin/udevtrigger
/sbin/udevsettle
- (cd /; tar cf /etc/dev.tar /dev)
fi
echo
else
/sbin/udevadm trigger
/sbin/udevadm settle
- (cd /; tar cf /etc/dev.tar /dev)
fi
echo
else
/sbin/udevadm trigger
/sbin/udevadm settle
- (cd /; tar cf /etc/dev.tar /dev)
fi
echo
else
/sbin/udevadm trigger
/sbin/udevadm settle
- (cd /; tar cf /etc/dev.tar /dev)
fi
echo
file://mount.sh \
file://network.sh \
file://local.rules \
+ file://udev-cache \
file://init"
UDEV_DEVFS_RULES ?= "0"
-PACKAGES =+ "udev-utils libvolume-id"
+PACKAGES =+ "udev-utils libvolume-id udev-cache"
FILES_udev-utils = "${usrbindir}/udevinfo ${usrbindir}/udevtest"
FILES_libvolume-id = "${base_libdir}/libvolume_id.so.*"
+FILES_udev-cache = "${sysconfdir}/init.d/udev-cache"
-RRECOMMENDS_${PN} = "udev-extraconf"
+RRECOMMENDS_${PN} += "udev-extraconf udev-cache"
inherit update-rc.d autotools pkgconfig
-INITSCRIPT_NAME = "udev"
-INITSCRIPT_PARAMS = "start 04 S ."
+INITSCRIPT_PACKAGES = "udev udev-cache"
+INITSCRIPT_NAME_udev = "udev"
+INITSCRIPT_PARAMS_udev = "start 04 S ."
+INITSCRIPT_NAME_udev-cache = "udev-cache"
+INITSCRIPT_PARAMS_udev-cache = "start 36 S ."
export CROSS = "${TARGET_PREFIX}"
export HOSTCC = "${BUILD_CC}"
oe_runmake 'DESTDIR=${D}' INSTALL=install install
install -d ${D}${sysconfdir}/init.d
install -m 0755 ${WORKDIR}/init ${D}${sysconfdir}/init.d/udev
+ install -m 0755 ${WORKDIR}/udev-cache ${D}${sysconfdir}/init.d/udev-cache
install -d ${D}${sysconfdir}/udev/rules.d/
oe_runmake 'DESTDIR=${D}' INSTALL=install install
install -d ${D}${sysconfdir}/init.d
install -m 0755 ${WORKDIR}/init ${D}${sysconfdir}/init.d/udev
+ install -m 0755 ${WORKDIR}/udev-cache ${D}${sysconfdir}/init.d/udev-cache
install -d ${D}${sysconfdir}/udev/rules.d/
oe_runmake 'DESTDIR=${D}' INSTALL=install install
install -d ${D}${sysconfdir}/init.d
install -m 0755 ${WORKDIR}/init ${D}${sysconfdir}/init.d/udev
+ install -m 0755 ${WORKDIR}/udev-cache ${D}${sysconfdir}/init.d/udev-cache
install -d ${D}${sysconfdir}/udev/rules.d/
oe_runmake 'DESTDIR=${D}' INSTALL=install install
install -d ${D}${sysconfdir}/init.d
install -m 0755 ${WORKDIR}/init ${D}${sysconfdir}/init.d/udev
+ install -m 0755 ${WORKDIR}/udev-cache ${D}${sysconfdir}/init.d/udev-cache
install -d ${D}${sysconfdir}/udev/rules.d/
require udev.inc
-INITSCRIPT_PARAMS = "start 03 S ."
-
FILES_${PN} += "${base_libdir}/udev/*"
FILES_${PN}-dbg += "${base_libdir}/udev/.debug"
UDEV_EXTRAS = "extras/firmware/ extras/scsi_id/ extras/volume_id/"
oe_runmake 'DESTDIR=${D}' INSTALL=install install
install -d ${D}${sysconfdir}/init.d
install -m 0755 ${WORKDIR}/init ${D}${sysconfdir}/init.d/udev
+ install -m 0755 ${WORKDIR}/udev-cache ${D}${sysconfdir}/init.d/udev-cache
install -d ${D}${sysconfdir}/udev/rules.d/
oe_runmake 'DESTDIR=${D}' INSTALL=install install
install -d ${D}${sysconfdir}/init.d
install -m 0755 ${WORKDIR}/init ${D}${sysconfdir}/init.d/udev
+ install -m 0755 ${WORKDIR}/udev-cache ${D}${sysconfdir}/init.d/udev-cache
install -d ${D}${sysconfdir}/udev/rules.d/
do_stage () {
autotools_stage_all
-}
\ No newline at end of file
+}