summaryrefslogtreecommitdiffstats
path: root/meta/recipes-core
diff options
context:
space:
mode:
authorRichard Tollerton <rich.tollerton@ni.com>2014-01-13 15:51:33 -0600
committerRichard Purdie <richard.purdie@linuxfoundation.org>2014-12-19 18:08:01 +0000
commit408baa9903bbfd16485fcba74430558e518d29ed (patch)
treefed440fbe8fc2241052dc7ff0b5b4c0bf688319d /meta/recipes-core
parent88c184a9bf550ca3774df364cf95edd0dae611bb (diff)
downloadpoky-408baa9903bbfd16485fcba74430558e518d29ed.tar.gz
udev-cache: Update cache asynchronously
Don't hold up the boot while the cache is being updated. (From OE-Core rev: eb52b257511b7624c8e212f5e9df711935d619ee) Signed-off-by: Richard Tollerton <rich.tollerton@ni.com> Signed-off-by: Ben Shelton <ben.shelton@ni.com> Acked-by: Gratian Crisan <gratian.crisan@ni.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-core')
-rw-r--r--meta/recipes-core/udev/udev/udev-cache20
1 files changed, 11 insertions, 9 deletions
diff --git a/meta/recipes-core/udev/udev/udev-cache b/meta/recipes-core/udev/udev/udev-cache
index 571463fa01..3c18061991 100644
--- a/meta/recipes-core/udev/udev/udev-cache
+++ b/meta/recipes-core/udev/udev/udev-cache
@@ -44,15 +44,17 @@ fi
44 44
45if [ "$DEVCACHE" != "" -a -e "$DEVCACHE_REGEN" ]; then 45if [ "$DEVCACHE" != "" -a -e "$DEVCACHE_REGEN" ]; then
46 echo "Populating dev cache" 46 echo "Populating dev cache"
47 udevadm control --stop-exec-queue 47 (
48 sysconf_cmd > "$SYSCONF_TMP" 48 udevadm control --stop-exec-queue
49 find /dev -xdev \( -type b -o -type c -o -type l \) | cut -c 2- \ 49 sysconf_cmd > "$SYSCONF_TMP"
50 | xargs tar cf "${DEVCACHE_TMP}" -T- 50 find /dev -xdev \( -type b -o -type c -o -type l \) | cut -c 2- \
51 gzip < "${DEVCACHE_TMP}" > "$DEVCACHE" 51 | xargs tar cf "${DEVCACHE_TMP}" -T-
52 rm -f "${DEVCACHE_TMP}" 52 gzip < "${DEVCACHE_TMP}" > "$DEVCACHE"
53 mv "$SYSCONF_TMP" "$SYSCONF_CACHED" 53 rm -f "${DEVCACHE_TMP}"
54 udevadm control --start-exec-queue 54 mv "$SYSCONF_TMP" "$SYSCONF_CACHED"
55 rm -f "$DEVCACHE_REGEN" 55 udevadm control --start-exec-queue
56 rm -f "$DEVCACHE_REGEN"
57 ) &
56fi 58fi
57 59
58exit 0 60exit 0