Merge branch 'master' of https://github.com/ffzg/gnt-info
authorDobrica Pavlinusic <dpavlin@rot13.org>
Mon, 15 Jan 2018 18:34:13 +0000 (19:34 +0100)
committerDobrica Pavlinusic <dpavlin@rot13.org>
Mon, 15 Jan 2018 18:34:13 +0000 (19:34 +0100)
1  2 
smart-megaraid.sh

@@@ -4,10 -4,13 +4,13 @@@
  # smart-megaraid.sh '^# 1'            # default without args
  # SMART="-t long" smart-megaraid.sh   # execute smart command
  
 -pattern='^# 1'
 -test ! -z "$1" && pattern=$1
 +pattern='(^# [1-2]|test remaining|Hours|Error|Serial|Model|Firmware)'
 +test ! -z "$1" && pattern=$*
  
+ did_megaraid=0
  megaraid() {
+       test $did_megaraid -eq 1 && return
        drive=$1
        nr=0
        while [ $nr -lt 8 ] ; do