]> git.sur5r.net Git - bacula/rescue/blobdiff - rescue/linux/usb/src/scripts/fullrestorescript
Add new usb rescue key code
[bacula/rescue] / rescue / linux / usb / src / scripts / fullrestorescript
diff --git a/rescue/linux/usb/src/scripts/fullrestorescript b/rescue/linux/usb/src/scripts/fullrestorescript
new file mode 100755 (executable)
index 0000000..10936e6
--- /dev/null
@@ -0,0 +1,103 @@
+. ./unmount-all
+dd if=working/diskinfo/mbr.sdi of=/dev/sdi
+. ./unmount-all
+#!/bin/sh
+#
+#  Format all partitions on disk /dev/sdi -- created by getdiskinfo
+#
+echo ""
+echo "This script will format all partitions on disk /dev/sdi."
+echo ""
+echo "IT WILL DESTROY ALL DATA ON DISK /dev/sdi !!!!"
+echo ""
+if [ ! -f noprompt ];then
+echo -n "Are you sure you want to continue? yes/no: "
+read a
+if [ x$a != xyes ] ; then
+   exit 1
+fi 
+fi
+if [ ! -f badblocksnoprompt ];then
+echo "Do you want to do a disk check for bad blocks?"
+echo -n "It is recommended, but takes time. yes/no: "
+read a
+if [ x$a = xyes ] ; then
+   check="-c"
+else
+   check=
+fi
+else
+   check=
+fi
+
+#
+#  Format all partitions on disk sdj1 -- created by getdiskinfo
+#
+echo ""
+echo "This script will format all partitions on disk sdj1."
+echo ""
+echo "IT WILL DESTROY ALL DATA ON DISK sdj1 !!!!"
+echo ""
+echo -n "Are you sure you want to continue? yes/no: "
+read a
+if [ x$a != xyes ] ; then
+   exit 1
+fi 
+if [ ! -f badblocksnoprompt ];then
+echo "Do you want to do a disk check for bad blocks?"
+echo -n "It is recommended, but takes time. yes/no: "
+read a
+if [ x$a = xyes ] ; then
+  check="-c"
+else
+   check=
+fi
+fi
+
+#
+#  Format all partitions on disk sdh1 -- created by getdiskinfo
+#
+echo ""
+echo "This script will format all partitions on disk sdh1."
+echo ""
+echo "IT WILL DESTROY ALL DATA ON DISK sdh1 !!!!"
+echo ""
+echo -n "Are you sure you want to continue? yes/no: "
+read a
+if [ x$a != xyes ] ; then
+   exit 1
+fi 
+if [ ! -f badblocksnoprompt ];then
+echo "Do you want to do a disk check for bad blocks?"
+echo -n "It is recommended, but takes time. yes/no: "
+read a
+if [ x$a = xyes ] ; then
+  check="-c"
+else
+   check=
+fi
+fi
+
+#
+#  Format all partitions on disk sdg1 -- created by getdiskinfo
+#
+echo ""
+echo "This script will format all partitions on disk sdg1."
+echo ""
+echo "IT WILL DESTROY ALL DATA ON DISK sdg1 !!!!"
+echo ""
+echo -n "Are you sure you want to continue? yes/no: "
+read a
+if [ x$a != xyes ] ; then
+   exit 1
+fi 
+if [ ! -f badblocksnoprompt ];then
+echo "Do you want to do a disk check for bad blocks?"
+echo -n "It is recommended, but takes time. yes/no: "
+read a
+if [ x$a = xyes ] ; then
+  check="-c"
+else
+   check=
+fi
+fi