From 72bd2b4125c37a6e1a50fc8b2e38d2be21b79a89 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Sommer?= Date: Wed, 28 Jun 2023 19:16:30 +0200 Subject: [PATCH] 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 --- stress-tests/stress-tests.sh | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/stress-tests/stress-tests.sh b/stress-tests/stress-tests.sh index 2031bcb..f6f49f6 100755 --- a/stress-tests/stress-tests.sh +++ b/stress-tests/stress-tests.sh @@ -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."