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:
parent
bd7fb7c3ca
commit
8c423bf995
|
@ -27,7 +27,8 @@ fi
|
|||
if [ "$DEVCACHE" != "" -a -e /dev/shm/udev.cache ]; then
|
||||
echo "Populating dev cache"
|
||||
(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
|
||||
fi
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
# Default for /etc/init.d/udev
|
||||
|
||||
# Comment this out to disable device cache
|
||||
DEVCACHE="/etc/dev.tar"
|
||||
DEVCACHE="/etc/dev.tar.gz"
|
||||
PROBE_PLATFORM_BUS="yes"
|
||||
|
|
Loading…
Reference in New Issue