diff options
Diffstat (limited to 'meta/recipes-core/udev/udev/udev-cache')
-rw-r--r-- | meta/recipes-core/udev/udev/udev-cache | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/meta/recipes-core/udev/udev/udev-cache b/meta/recipes-core/udev/udev/udev-cache index 814ef54c3c..4d50876b64 100644 --- a/meta/recipes-core/udev/udev/udev-cache +++ b/meta/recipes-core/udev/udev/udev-cache | |||
@@ -24,6 +24,12 @@ DEVCACHE_REGEN="/dev/shm/udev-regen" # create to request cache regen | |||
24 | # 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. |
25 | CMP_FILE_LIST="/proc/version /proc/cmdline /proc/devices" | 25 | CMP_FILE_LIST="/proc/version /proc/cmdline /proc/devices" |
26 | [ -f /proc/atags ] && CMP_FILE_LIST="$CMP_FILE_LIST /proc/atags" | 26 | [ -f /proc/atags ] && CMP_FILE_LIST="$CMP_FILE_LIST /proc/atags" |
27 | |||
28 | # Command to compute system configuration. | ||
29 | sysconf_cmd () { | ||
30 | cat -- $CMP_FILE_LIST | ||
31 | } | ||
32 | |||
27 | [ -f /etc/default/udev-cache ] && . /etc/default/udev-cache | 33 | [ -f /etc/default/udev-cache ] && . /etc/default/udev-cache |
28 | 34 | ||
29 | if [ "$ROOTFS_READ_ONLY" = "yes" ]; then | 35 | if [ "$ROOTFS_READ_ONLY" = "yes" ]; then |
@@ -34,7 +40,7 @@ fi | |||
34 | if [ "$DEVCACHE" != "" -a -e "$DEVCACHE_REGEN" ]; then | 40 | if [ "$DEVCACHE" != "" -a -e "$DEVCACHE_REGEN" ]; then |
35 | echo "Populating dev cache" | 41 | echo "Populating dev cache" |
36 | udevadm control --stop-exec-queue | 42 | udevadm control --stop-exec-queue |
37 | cat -- $CMP_FILE_LIST > "$SYSCONF_TMP" | 43 | sysconf_cmd > "$SYSCONF_TMP" |
38 | find /dev -xdev \( -type b -o -type c -o -type l \) | cut -c 2- \ | 44 | find /dev -xdev \( -type b -o -type c -o -type l \) | cut -c 2- \ |
39 | | xargs tar cf "${DEVCACHE_TMP}" -T- | 45 | | xargs tar cf "${DEVCACHE_TMP}" -T- |
40 | gzip < "${DEVCACHE_TMP}" > "$DEVCACHE" | 46 | gzip < "${DEVCACHE_TMP}" > "$DEVCACHE" |