]> code.ossystems Code Review - openembedded-core.git/commitdiff
udev-cache: Update cache asynchronously
authorRichard Tollerton <rich.tollerton@ni.com>
Mon, 13 Jan 2014 21:51:33 +0000 (15:51 -0600)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Fri, 19 Dec 2014 17:54:15 +0000 (17:54 +0000)
Don't hold up the boot while the cache is being updated.

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>
meta/recipes-core/udev/udev/udev-cache

index 571463fa01e4b49bcaf7f9e41051ab41d5c3b5ab..3c1806199113cead3b0f2f85620c4f0dccc6c3b0 100644 (file)
@@ -44,15 +44,17 @@ fi
 
 if [ "$DEVCACHE" != "" -a -e "$DEVCACHE_REGEN" ]; then
        echo "Populating dev cache"
-       udevadm control --stop-exec-queue
-        sysconf_cmd > "$SYSCONF_TMP"
-       find /dev -xdev \( -type b -o -type c -o -type l \) | cut -c 2- \
-               | xargs tar cf "${DEVCACHE_TMP}" -T-
-       gzip < "${DEVCACHE_TMP}" > "$DEVCACHE"
-       rm -f "${DEVCACHE_TMP}"
-       mv "$SYSCONF_TMP" "$SYSCONF_CACHED"
-       udevadm control --start-exec-queue
-       rm -f "$DEVCACHE_REGEN"
+       (
+               udevadm control --stop-exec-queue
+               sysconf_cmd > "$SYSCONF_TMP"
+               find /dev -xdev \( -type b -o -type c -o -type l \) | cut -c 2- \
+                       | xargs tar cf "${DEVCACHE_TMP}" -T-
+                       gzip < "${DEVCACHE_TMP}" > "$DEVCACHE"
+                       rm -f "${DEVCACHE_TMP}"
+                       mv "$SYSCONF_TMP" "$SYSCONF_CACHED"
+                       udevadm control --start-exec-queue
+                       rm -f "$DEVCACHE_REGEN"
+       ) &
 fi
 
 exit 0