stress-tests: don't replace file.tar

The directory /var/log might contain no much data. Better keep the file
provided by the user.

Closes: #2
This commit is contained in:
Jörg Sommer 2023-06-28 19:16:30 +02:00
parent 95cc35b4e8
commit 72bd2b4125

View File

@ -13,10 +13,9 @@ for dev in /dev/mmcblk? /dev/sd?; do
done
# I/O load (USB read/write)
if mount | grep /mnt/pendrive >/dev/null; then
if mount | grep -q /mnt/pendrive; then
if [ -e /mnt/pendrive/file.tar ]; then
cd /mnt/pendrive
tar -cf file.tar -C /var/log --exclude=lost+found -p .
while true; do rm -rf output; mkdir -p output; tar xfv file.tar -C output/ >/dev/null 2>&1; done &
else
echo "Warning: Archive file.tar not found in /mnt/pendrive. USB read/write stress test will not run."