diff options
Diffstat (limited to 'meta/recipes-core/udev/udev/udev-cache')
-rw-r--r-- | meta/recipes-core/udev/udev/udev-cache | 14 |
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 | 12 | export 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 | ||
16 | if [ ! -e /etc/dev.tar ]; then | 20 | if [ "$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 | ||
24 | else | ||
25 | rm -f /dev/shm/udev.cache | ||
18 | fi | 26 | fi |
19 | 27 | ||
20 | exit 0 | 28 | exit 0 |