]> git.sur5r.net Git - bacula/rescue/blobdiff - rescue/linux/usb/src/scripts/restore/all_raids_there
Add new usb rescue key code
[bacula/rescue] / rescue / linux / usb / src / scripts / restore / all_raids_there
diff --git a/rescue/linux/usb/src/scripts/restore/all_raids_there b/rescue/linux/usb/src/scripts/restore/all_raids_there
new file mode 100644 (file)
index 0000000..b6104bf
--- /dev/null
@@ -0,0 +1,18 @@
+#!/bin/sh
+
+cat checkraidtemp|while read line;do
+                       field=`echo $line|wc -w`
+                       while [ $field -ne 0 ];do
+                       a=`echo $line|awk "{ print \$ $field }"`
+                       echo $a|grep /dev|grep -v md >/dev/null 2>&1
+                               if [ $? = 0 ];then
+                               blkid $a |grep raid>/dev/null 2>&1
+                                       if [ ! $? = 0 ];then
+                                       dis=${a%?}
+                                       echo $dis>>disklist
+                                       fi
+                                       
+                               fi
+                       field=$(( field - 1 ))
+                       done
+done