aboutsummaryrefslogtreecommitdiffstats
path: root/meta/recipes-core/udev/udev/udev-cache
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-core/udev/udev/udev-cache')
-rw-r--r--meta/recipes-core/udev/udev/udev-cache14
1 files changed, 11 insertions, 3 deletions
diff --git a/meta/recipes-core/udev/udev/udev-cache b/meta/recipes-core/udev/udev/udev-cache
index 77bbda6f1b..9c24e76514 100644
--- a/meta/recipes-core/udev/udev/udev-cache
+++ b/meta/recipes-core/udev/udev/udev-cache
@@ -9,12 +9,20 @@
# Short-Description: cache /dev to speedup the udev next boot
### END INIT INFO
-[ -d /sys/class ] || exit 1
+export TZ=/etc/localtime
+
[ -r /proc/mounts ] || exit 1
[ -x /sbin/udevd ] || exit 1
+[ -d /sys/class ] || exit 1
+
+[ -f /etc/default/udev-cache ] && . /etc/default/udev-cache
-if [ ! -e /etc/dev.tar ]; then
- (cd /; tar cf /etc/dev.tar dev)
+if [ "$DEVCACHE" != "" ]; then
+ echo "Populating dev cache"
+ (cd /; tar cf "$DEVCACHE" dev)
+ mv /dev/shm/udev.cache /etc/udev/cache.data
+else
+ rm -f /dev/shm/udev.cache
fi
exit 0