]> git.sur5r.net Git - bacula/rescue/blobdiff - rescue/linux/usb/src/scripts/restore/restoredebut
Add new usb rescue key code
[bacula/rescue] / rescue / linux / usb / src / scripts / restore / restoredebut
diff --git a/rescue/linux/usb/src/scripts/restore/restoredebut b/rescue/linux/usb/src/scripts/restore/restoredebut
new file mode 100755 (executable)
index 0000000..1bf859e
--- /dev/null
@@ -0,0 +1,55 @@
+#!/bin/sh
+
+
+alldone=1
+raidone=1
+lvmother=1
+none=""
+z=0
+bar="/"
+one="1"
+two="2"
+three="3"
+cwd=`pwd`
+host=`hostname`
+a=1
+points=":"
+out=1
+yes="y"
+no="n"
+mdlvm=0
+md=md
+lvdiskgood=0
+otherdisk=1
+newdisk=""
+
+if [ -f nozen ]; then 
+DIALOG=dialog
+else
+DIALOG=Xdialog
+fi
+
+$DIALOG --title "Warning  !!!" --yesno "For this to work, the address of the storage daemon  in the director \n file bacula-dir.conf must be the actual ip (e.g 192.168.1.100) \n and not the hostname \n \n Continue ?" 30 60 
+
+  if [ ! $? = 0 ];then
+       exit 1
+  fi           
+
+
+                       if [ -f raidtemp ];then
+                       rm raidtemp
+                       fi
+
+ pid=`ps -ax|grep ermine|grep -v grep|awk '{print $1}'`
+if [ ! $pid = "" ];then
+kill $pid
+fi
+lsof |grep /media/bs-rescue/chroot|awk '{print $2}'|while read line ;do
+if [ ! $line = "" ];then
+kill $line
+fi
+done
+umount -a >/dev/null 2>&1                    
+. ./release_raids
+. ./restore2/clientdir
+. ./restore2/main