diff options
author | Richard Tollerton <rich.tollerton@ni.com> | 2014-01-13 15:51:33 -0600 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2014-12-19 17:54:15 +0000 |
commit | eb52b257511b7624c8e212f5e9df711935d619ee (patch) | |
tree | 642665893e6e2aa8dbd5930ed4177a0401906d40 /meta/recipes-core | |
parent | 8847e33b12171a21b7c7e1241198080ad9ef9284 (diff) | |
download | openembedded-core-eb52b257511b7624c8e212f5e9df711935d619ee.tar.gz openembedded-core-eb52b257511b7624c8e212f5e9df711935d619ee.tar.bz2 openembedded-core-eb52b257511b7624c8e212f5e9df711935d619ee.zip |
udev-cache: Update cache asynchronously
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>
Diffstat (limited to 'meta/recipes-core')
-rw-r--r-- | meta/recipes-core/udev/udev/udev-cache | 20 |
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 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 |