]> git.sur5r.net Git - bacula/rescue/blob - rescue/linux/usb/src/scripts/restore/warning
Add new usb rescue key code
[bacula/rescue] / rescue / linux / usb / src / scripts / restore / warning
1 #!/bin/sh
2
3
4 find working/scripts/format.* -type f -exec grep mk {} +|awk '{print $NF}' >wehave
5 while read line; do echo -n "$line "; done <wehave >tmp
6
7 wehave=`cat tmp`
8
9 blkid |grep raid|awk '{print $1}'|cut -d: -f1|cut -d/ -f3 >are_raids
10 while read line; do echo -n "$line "; done <are_raids >tmp
11 are_raids=`cat tmp`
12 rm are_raids
13 lv=`cat wehave |grep -v sd|grep -v hd`
14 if [ ! $lv = "" ];then
15 field=`cat working/scripts/create-vg |grep vgcreate|wc -w`
16                         while [ $field -ne 0 ];do
17                         a=`cat working/scripts/create-vg |grep vgcreate|awk "{ print \$ $field }"`
18                         echo $a|grep /dev >/dev/null 2>&1
19                                 if [ $? = 0 ];then
20                                 
21                                         echo $a >>lvdisks
22                                         
23                                         
24                                 fi
25                         field=$(( field - 1 ))
26                         done
27 while read line; do echo -n "$line "; done <lvdisks >tmp
28 lvm=`cat tmp`
29 lvm=`echo $lvm`
30 rm lvdisks
31 else
32 lvm="NO LVM!!!"
33 lv="NO LVM!!!"
34 fi
35 rm wehave
36 rm tmp
37 if [ -f ./nozen ]; then 
38 DIALOG=dialog
39 else
40 DIALOG=Xdialog
41 fi
42
43 $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
44