From 605ed2b37155b17d0601663ec9be4c89a75230a8 Mon Sep 17 00:00:00 2001 From: ThomasKaiser Date: Mon, 28 Mar 2016 16:13:37 +0000 Subject: [PATCH] In case a really slow SD card is used display warning at 3rd boot --- scripts/armhwinfo | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/scripts/armhwinfo b/scripts/armhwinfo index 6a96a21806..b474a068b4 100644 --- a/scripts/armhwinfo +++ b/scripts/armhwinfo @@ -254,10 +254,32 @@ EOT chmod +x /etc/update-motd.d/90-warning } # show_motd_warning +check_sd_card_speed() { + # function that checks on 3rd boot whether firstrun script made a quick + # benchmark when a SD card with 4GB or less capacity has been detected + # and displays a warning when random I/O is below some tresholds. + RebootCount=$(grep -c '^### df:' /var/log/armhwinfo.log) + if [ ${RebootCount} -eq 2 ]; then + # check whether iozone data has been collected + IozoneResults="$(awk -F" " '/^### quick iozone test/ {print $10"\t"$11}'