X-Git-Url: https://git.sur5r.net/?p=bacula%2Frescue;a=blobdiff_plain;f=rescue%2Flinux%2Fusb%2Fsrc%2Fscripts%2Frestore%2Fwarning;fp=rescue%2Flinux%2Fusb%2Fsrc%2Fscripts%2Frestore%2Fwarning;h=7bf0232161a148f9606029ca86824a987943f775;hp=0000000000000000000000000000000000000000;hb=4dd8d7fe401088b31113cd54fc0cc87ae121c971;hpb=fb21b5066e01a80263767f2406829a10dfa58303 diff --git a/rescue/linux/usb/src/scripts/restore/warning b/rescue/linux/usb/src/scripts/restore/warning new file mode 100755 index 0000000..7bf0232 --- /dev/null +++ b/rescue/linux/usb/src/scripts/restore/warning @@ -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 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 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 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 +