From e0d9f349fc83ea0a4a1f4450c0aa4c41db40eb29 Mon Sep 17 00:00:00 2001 From: openoms Date: Wed, 29 May 2019 15:52:13 +0100 Subject: [PATCH] make stresstest exit 0 if not on Raspbian --- home.admin/config.scripts/blitz.stresstest.sh | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/home.admin/config.scripts/blitz.stresstest.sh b/home.admin/config.scripts/blitz.stresstest.sh index 1798dda..dc39ff5 100644 --- a/home.admin/config.scripts/blitz.stresstest.sh +++ b/home.admin/config.scripts/blitz.stresstest.sh @@ -7,6 +7,12 @@ if [ "$1" = "-h" ] || [ "$1" = "-help" ]; then exit 1 fi +isRaspbian=$(cat /etc/os-release 2>/dev/null | grep -c 'Raspbian') +if [ ${isRaspbian} -eq 0 ]; then + echo "the OS is not Raspbian - the stresstest is only for the Raspberry Pi" + exit 0 +fi + # Based on https://github.com/bamarni/pi64/issues/4#issuecomment-292707581 # sysbench manual: http://imysql.com/wp-content/uploads/2014/10/sysbench-manual.pdf