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-cache4
1 files changed, 3 insertions, 1 deletions
diff --git a/meta/recipes-core/udev/udev/udev-cache b/meta/recipes-core/udev/udev/udev-cache
index e0e1c39488..814ef54c3c 100644
--- a/meta/recipes-core/udev/udev/udev-cache
+++ b/meta/recipes-core/udev/udev/udev-cache
@@ -19,6 +19,7 @@ export TZ=/etc/localtime
19DEVCACHE_TMP="/dev/shm/udev-cache-tmp.tar" 19DEVCACHE_TMP="/dev/shm/udev-cache-tmp.tar"
20SYSCONF_CACHED="/etc/udev/cache.data" 20SYSCONF_CACHED="/etc/udev/cache.data"
21SYSCONF_TMP="/dev/shm/udev.cache" 21SYSCONF_TMP="/dev/shm/udev.cache"
22DEVCACHE_REGEN="/dev/shm/udev-regen" # create to request cache regen
22 23
23# A list of files which are used as a criteria to judge whether the udev cache could be reused. 24# A list of files which are used as a criteria to judge whether the udev cache could be reused.
24CMP_FILE_LIST="/proc/version /proc/cmdline /proc/devices" 25CMP_FILE_LIST="/proc/version /proc/cmdline /proc/devices"
@@ -30,7 +31,7 @@ if [ "$ROOTFS_READ_ONLY" = "yes" ]; then
30 exit 0 31 exit 0
31fi 32fi
32 33
33if [ "$DEVCACHE" != "" -a -e "$SYSCONF_TMP" ]; then 34if [ "$DEVCACHE" != "" -a -e "$DEVCACHE_REGEN" ]; then
34 echo "Populating dev cache" 35 echo "Populating dev cache"
35 udevadm control --stop-exec-queue 36 udevadm control --stop-exec-queue
36 cat -- $CMP_FILE_LIST > "$SYSCONF_TMP" 37 cat -- $CMP_FILE_LIST > "$SYSCONF_TMP"
@@ -40,6 +41,7 @@ if [ "$DEVCACHE" != "" -a -e "$SYSCONF_TMP" ]; then
40 rm -f "${DEVCACHE_TMP}" 41 rm -f "${DEVCACHE_TMP}"
41 mv "$SYSCONF_TMP" "$SYSCONF_CACHED" 42 mv "$SYSCONF_TMP" "$SYSCONF_CACHED"
42 udevadm control --start-exec-queue 43 udevadm control --start-exec-queue
44 rm -f "$DEVCACHE_REGEN"
43fi 45fi
44 46
45exit 0 47exit 0