summaryrefslogtreecommitdiffstats
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 @@
9# Short-Description: cache /dev to speedup the udev next boot 9# Short-Description: cache /dev to speedup the udev next boot
10### END INIT INFO 10### END INIT INFO
11 11
12[ -d /sys/class ] || exit 1 12export TZ=/etc/localtime
13
13[ -r /proc/mounts ] || exit 1 14[ -r /proc/mounts ] || exit 1
14[ -x /sbin/udevd ] || exit 1 15[ -x /sbin/udevd ] || exit 1
16[ -d /sys/class ] || exit 1
17
18[ -f /etc/default/udev-cache ] && . /etc/default/udev-cache
15 19
16if [ ! -e /etc/dev.tar ]; then 20if [ "$DEVCACHE" != "" ]; then
17 (cd /; tar cf /etc/dev.tar dev) 21 echo "Populating dev cache"
22 (cd /; tar cf "$DEVCACHE" dev)
23 mv /dev/shm/udev.cache /etc/udev/cache.data
24else
25 rm -f /dev/shm/udev.cache
18fi 26fi
19 27
20exit 0 28exit 0