add rescue, fix default pxe, ubuntu locale
[automated-distro-installer] / dsfull
diff --git a/dsfull b/dsfull
index 06af7f8f68e2ac0cd0f5fb768e83fcaf93dde284..417635014c3d8413649d7c03bb9c2ac9b92e7163 100755 (executable)
--- a/dsfull
+++ b/dsfull
@@ -26,10 +26,15 @@ fi
 usage() {
     cat <<EOF
 Usage: ${0##*/} [OPTIONS] HOST
-distro setup full using fai. (assuming we already synced data files to the host)
+"distro setup full" using fai.
+
+Note: relies on other repos and paths specific to Ian's system.
+Note: disables btrbk.timer. If it was active before, it should
+be manual reenabled after completion.
 
---no-r     Don't ssh to host and reboot.
 -k         ssh to host and kexec, don't use pxe. implies --no-r
+--no-r     Don't ssh to host and reboot. Use this for when you are
+           booting or rebooting from some other means.
 -h|--help  Print help and exit.
 
 Note: Uses GNU getopt options parsing style
@@ -56,7 +61,7 @@ host=$1
 
 ##### end command line parsing ########
 
-
+e ser stop btrbk.timer
 if [[ ! $host ]]; then
     echo "$0: error: expected 1 arg of hostname"
     exit 1
@@ -88,8 +93,14 @@ for ((i=0; i<240; i++)); do
     fi
     sleep 5
 done
+e faiserver-disable
 if $error; then
     echo "$0: error: timeout"
     exit 1
 fi
-e dsremote $host
+while [[ $(ser is-active btrbk.service) == active ]]; do
+    sleep 5
+done
+e btrbk-run -t $host
+ssh $host /a/bin/distro-setup/distro-begin
+#e dsremote $host