]> git.sur5r.net Git - bacula/rescue/blob - rescue/linux/usb/src/scripts/fullrestorescript
Add new usb rescue key code
[bacula/rescue] / rescue / linux / usb / src / scripts / fullrestorescript
1 . ./unmount-all
2 dd if=working/diskinfo/mbr.sdi of=/dev/sdi
3 . ./unmount-all
4 #!/bin/sh
5 #
6 #  Format all partitions on disk /dev/sdi -- created by getdiskinfo
7 #
8 echo ""
9 echo "This script will format all partitions on disk /dev/sdi."
10 echo ""
11 echo "IT WILL DESTROY ALL DATA ON DISK /dev/sdi !!!!"
12 echo ""
13 if [ ! -f noprompt ];then
14 echo -n "Are you sure you want to continue? yes/no: "
15 read a
16 if [ x$a != xyes ] ; then
17    exit 1
18 fi 
19 fi
20 if [ ! -f badblocksnoprompt ];then
21 echo "Do you want to do a disk check for bad blocks?"
22 echo -n "It is recommended, but takes time. yes/no: "
23 read a
24 if [ x$a = xyes ] ; then
25    check="-c"
26 else
27    check=
28 fi
29 else
30    check=
31 fi
32
33 #
34 #  Format all partitions on disk sdj1 -- created by getdiskinfo
35 #
36 echo ""
37 echo "This script will format all partitions on disk sdj1."
38 echo ""
39 echo "IT WILL DESTROY ALL DATA ON DISK sdj1 !!!!"
40 echo ""
41 echo -n "Are you sure you want to continue? yes/no: "
42 read a
43 if [ x$a != xyes ] ; then
44    exit 1
45 fi 
46 if [ ! -f badblocksnoprompt ];then
47 echo "Do you want to do a disk check for bad blocks?"
48 echo -n "It is recommended, but takes time. yes/no: "
49 read a
50 if [ x$a = xyes ] ; then
51   check="-c"
52 else
53    check=
54 fi
55 fi
56
57 #
58 #  Format all partitions on disk sdh1 -- created by getdiskinfo
59 #
60 echo ""
61 echo "This script will format all partitions on disk sdh1."
62 echo ""
63 echo "IT WILL DESTROY ALL DATA ON DISK sdh1 !!!!"
64 echo ""
65 echo -n "Are you sure you want to continue? yes/no: "
66 read a
67 if [ x$a != xyes ] ; then
68    exit 1
69 fi 
70 if [ ! -f badblocksnoprompt ];then
71 echo "Do you want to do a disk check for bad blocks?"
72 echo -n "It is recommended, but takes time. yes/no: "
73 read a
74 if [ x$a = xyes ] ; then
75   check="-c"
76 else
77    check=
78 fi
79 fi
80
81 #
82 #  Format all partitions on disk sdg1 -- created by getdiskinfo
83 #
84 echo ""
85 echo "This script will format all partitions on disk sdg1."
86 echo ""
87 echo "IT WILL DESTROY ALL DATA ON DISK sdg1 !!!!"
88 echo ""
89 echo -n "Are you sure you want to continue? yes/no: "
90 read a
91 if [ x$a != xyes ] ; then
92    exit 1
93 fi 
94 if [ ! -f badblocksnoprompt ];then
95 echo "Do you want to do a disk check for bad blocks?"
96 echo -n "It is recommended, but takes time. yes/no: "
97 read a
98 if [ x$a = xyes ] ; then
99   check="-c"
100 else
101    check=
102 fi
103 fi