mirror of
https://git.yoctoproject.org/poky
synced 2026-06-03 01:40:07 +00:00
udev-cache: Compress the cache
$DEVCACHE is observed to be 100k uncompressed; compressing it reduces its size to ~5k. But compress it outside of `tar` so that archival operation takes as little time as possible, to minimize the risk of devices being created/removed during execution. (From OE-Core rev: 571df6ddba1caa6805f7c96cd592eea399c2aee2) Signed-off-by: Richard Tollerton <rich.tollerton@ni.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
committed by
Richard Purdie
parent
bd7fb7c3ca
commit
8c423bf995
@@ -27,7 +27,8 @@ fi
|
|||||||
if [ "$DEVCACHE" != "" -a -e /dev/shm/udev.cache ]; then
|
if [ "$DEVCACHE" != "" -a -e /dev/shm/udev.cache ]; then
|
||||||
echo "Populating dev cache"
|
echo "Populating dev cache"
|
||||||
(cd /; tar cf "${DEVCACHE_TMP}" dev)
|
(cd /; tar cf "${DEVCACHE_TMP}" dev)
|
||||||
mv -f "${DEVCACHE_TMP}" "$DEVCACHE"
|
gzip < "${DEVCACHE_TMP}" > "$DEVCACHE"
|
||||||
|
rm -f "${DEVCACHE_TMP}"
|
||||||
mv /dev/shm/udev.cache /etc/udev/cache.data
|
mv /dev/shm/udev.cache /etc/udev/cache.data
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
# Default for /etc/init.d/udev
|
# Default for /etc/init.d/udev
|
||||||
|
|
||||||
# Comment this out to disable device cache
|
# Comment this out to disable device cache
|
||||||
DEVCACHE="/etc/dev.tar"
|
DEVCACHE="/etc/dev.tar.gz"
|
||||||
PROBE_PLATFORM_BUS="yes"
|
PROBE_PLATFORM_BUS="yes"
|
||||||
|
|||||||
Reference in New Issue
Block a user