]> git.sur5r.net Git - bacula/rescue/blobdiff - rescue/linux/usb/src/scripts/restore/warning
Add new usb rescue key code
[bacula/rescue] / rescue / linux / usb / src / scripts / restore / warning
diff --git a/rescue/linux/usb/src/scripts/restore/warning b/rescue/linux/usb/src/scripts/restore/warning
new file mode 100755 (executable)
index 0000000..7bf0232
--- /dev/null
@@ -0,0 +1,44 @@
+#!/bin/sh
+
+
+find working/scripts/format.* -type f -exec grep mk {} +|awk '{print $NF}' >wehave
+while read line; do echo -n "$line "; done <wehave >tmp
+
+wehave=`cat tmp`
+
+blkid |grep raid|awk '{print $1}'|cut -d: -f1|cut -d/ -f3 >are_raids
+while read line; do echo -n "$line "; done <are_raids >tmp
+are_raids=`cat tmp`
+rm are_raids
+lv=`cat wehave |grep -v sd|grep -v hd`
+if [ ! $lv = "" ];then
+field=`cat working/scripts/create-vg |grep vgcreate|wc -w`
+                       while [ $field -ne 0 ];do
+                       a=`cat working/scripts/create-vg |grep vgcreate|awk "{ print \$ $field }"`
+                       echo $a|grep /dev >/dev/null 2>&1
+                               if [ $? = 0 ];then
+                               
+                                       echo $a >>lvdisks
+                                       
+                                       
+                               fi
+                       field=$(( field - 1 ))
+                       done
+while read line; do echo -n "$line "; done <lvdisks >tmp
+lvm=`cat tmp`
+lvm=`echo $lvm`
+rm lvdisks
+else
+lvm="NO LVM!!!"
+lv="NO LVM!!!"
+fi
+rm wehave
+rm tmp
+if [ -f ./nozen ]; then 
+DIALOG=dialog
+else
+DIALOG=Xdialog
+fi
+
+$DIALOG --msgbox "WARNING \n \n \n We only have gathered formatting info for : \n $wehave \n \n \n  $are_raids are raid devices \n \n \n And the lvm $lv is composed of $lvm \n \n \n If you choose a part of a raid or lvm , \n the other parts will be choosen automatically" 600 600
+