[oe-commits] Richard Tollerton : udev-cache: Update cache asynchronously
git at git.openembedded.org
git at git.openembedded.org
Fri Dec 19 18:09:07 UTC 2014
Module: openembedded-core.git
Branch: master-next
Commit: eb52b257511b7624c8e212f5e9df711935d619ee
URL: http://git.openembedded.org/?p=openembedded-core.git&a=commit;h=eb52b257511b7624c8e212f5e9df711935d619ee
Author: Richard Tollerton <rich.tollerton at ni.com>
Date: Mon Jan 13 15:51:33 2014 -0600
udev-cache: Update cache asynchronously
Don't hold up the boot while the cache is being updated.
Signed-off-by: Richard Tollerton <rich.tollerton at ni.com>
Signed-off-by: Ben Shelton <ben.shelton at ni.com>
Acked-by: Gratian Crisan <gratian.crisan at ni.com>
---
meta/recipes-core/udev/udev/udev-cache | 20 +++++++++++---------
1 file changed, 11 insertions(+), 9 deletions(-)
diff --git a/meta/recipes-core/udev/udev/udev-cache b/meta/recipes-core/udev/udev/udev-cache
index 571463f..3c18061 100644
--- a/meta/recipes-core/udev/udev/udev-cache
+++ b/meta/recipes-core/udev/udev/udev-cache
@@ -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
More information about the Openembedded-commits
mailing list