5 if [ -f noprompt ];then
9 if [ -f badblocksnoprompt ];then
13 if [ -f partitionscript ];then
16 if [ -f formatallscript ];then
21 if [ -f added_disks ];then
25 if [ -f checkraidtemp ];then
29 if [ -f added_disks ];then
33 if [ -f fulldisks ];then
36 if [ -f checkraidtemp ];then
39 if [ -f raidisks ];then
46 if [ -d working ];then
49 cp -r ../clients/$clientdir working
60 #partprobe >>/dev/null 2>&1
61 #. ./restore2/checkdiffnew2
62 . ./restore2/get_serial_restore
63 . ./restore2/change_names_new
65 . ./restore2/choosedisk
69 $DIALOG --title "AUTOMATIC ?" --yesno "do you want to automatically restore all disks ? \n (otherwise you will be prompted for each disk)" 30 60
74 $DIALOG --title "AUTOMATIC ?" --yesno "do you want to automatically disable \n the check for bad blocks on all disks ? \n (otherwise you will be prompted for each disk)" 30 60
77 echo "" > badblocksnoprompt
80 ####################################################check raid
82 . ./restore2/checkraid
89 ######################################## check lvm
90 if [ -f working/scripts/create-vg ];then
92 . ./restore2/check_lvm
95 ####################################################recheck raid
98 . ./restore2/checkraid
100 #############################################check wether all raid disks have the right partition type
102 . ./restore2/all_raids_there
103 ###########################################do all disks
106 cat disklist|while read line;do
108 . ./restore2/diskorpart
110 disk=`echo $disk |cut -d"/" -f3`
112 if [ "$partordisk" = "disk" ];then
115 . ./restore2/full_disk
122 if [ "$partordisk" = "part" ];then
124 d=`echo $di |tail -c2`
125 echo $d | egrep '^[0-9]+$' >/dev/null 2>&1
126 if [ "$?" -eq "0" ]; then
129 grep $di fulldisks>>/dev/null
140 if [ -f partitionscript ];then
141 chmod +x partitionscript
146 if [ -f checkraidtemp ];then
147 chmod +x checkraidtemp
148 ra=`cat checkraidtemp`
149 if [ ! "$ra" = "" ];then
162 if [ -f working/scripts/create-vg ];then
166 if [ ! "$ra" = "" ];then
177 $DIALOG --title "Format ?" --yesno "Now we will format the choosen disks, Do you want to do this ?? \n Normally you would answer yes here, \n Only answer No if you want to try to restore them with bacula without formatting them first \n (this could be usefull if you know what's broken on your system \n and you just want bacula to replace certain files) " 600 600
180 chmod +x formatallscript
184 # if [ -d clients/$clientdir.working.bak ];then
185 #mv clients/$clientdir.working.bak clients/$clientdir