mirror of
https://git.yoctoproject.org/poky
synced 2026-09-19 00:49:33 +02:00
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>
This commit is contained in:
committed by
Richard Purdie
parent
88c184a9bf
commit
408baa9903
@@ -44,15 +44,17 @@ fi
|
|||||||
|
|
||||||
if [ "$DEVCACHE" != "" -a -e "$DEVCACHE_REGEN" ]; then
|
if [ "$DEVCACHE" != "" -a -e "$DEVCACHE_REGEN" ]; then
|
||||||
echo "Populating dev cache"
|
echo "Populating dev cache"
|
||||||
udevadm control --stop-exec-queue
|
(
|
||||||
sysconf_cmd > "$SYSCONF_TMP"
|
udevadm control --stop-exec-queue
|
||||||
find /dev -xdev \( -type b -o -type c -o -type l \) | cut -c 2- \
|
sysconf_cmd > "$SYSCONF_TMP"
|
||||||
| xargs tar cf "${DEVCACHE_TMP}" -T-
|
find /dev -xdev \( -type b -o -type c -o -type l \) | cut -c 2- \
|
||||||
gzip < "${DEVCACHE_TMP}" > "$DEVCACHE"
|
| xargs tar cf "${DEVCACHE_TMP}" -T-
|
||||||
rm -f "${DEVCACHE_TMP}"
|
gzip < "${DEVCACHE_TMP}" > "$DEVCACHE"
|
||||||
mv "$SYSCONF_TMP" "$SYSCONF_CACHED"
|
rm -f "${DEVCACHE_TMP}"
|
||||||
udevadm control --start-exec-queue
|
mv "$SYSCONF_TMP" "$SYSCONF_CACHED"
|
||||||
rm -f "$DEVCACHE_REGEN"
|
udevadm control --start-exec-queue
|
||||||
|
rm -f "$DEVCACHE_REGEN"
|
||||||
|
) &
|
||||||
fi
|
fi
|
||||||
|
|
||||||
exit 0
|
exit 0
|
||||||
|
|||||||
Reference in New Issue
Block a user