Merge branch 'master' of github.com:ffzg/gnt-info
[gnt-info] / gnt-smart.sh
index 958375d..2194cea 100755 (executable)
@@ -1,3 +1,9 @@
 #!/bin/sh -e
 
-ls /dev/sd? | xargs -i sh -ec 'echo -n "{}\t" ; smartctl -l selftest {} | grep "^# 1"'
+if [ "$1" = "clean" ] ; then
+       gnt-cluster command -M rm -v '/dev/shm/*smart*'
+fi
+
+cp /srv/gnt-info/smart-megaraid.sh /tmp/
+gnt-cluster copyfile /tmp/smart-megaraid.sh
+gnt-cluster command -M /tmp/smart-megaraid.sh $* | tee /dev/shm/gnt-smart