minor fixes
authorIan Kelling <iank@fsf.org>
Fri, 16 Jul 2021 13:44:18 +0000 (09:44 -0400)
committerIan Kelling <iank@fsf.org>
Fri, 16 Jul 2021 13:44:18 +0000 (09:44 -0400)
dsfull
fai/config/files/root/fai-check/VOL_BUSTER_BOOTSTRAP
fai/config/hooks/partition.DEFAULT

diff --git a/dsfull b/dsfull
index 593e7d6e72ae3903ef3fee9773a51fbb551c853d..709ddab407f1163cff037c8efb647701e1d5142a 100755 (executable)
--- a/dsfull
+++ b/dsfull
@@ -98,9 +98,7 @@ fi
 while [[ $(ser is-active btrbk.service) == active ]]; do
     sleep 5
 done
-bbk -t $host archive
-bbk -t $host
-#ssh $host /a/bin/distro-setup/distro-begin
-# this should be done instead of distro-begin, but
-# keeping it to 2 steps for now
+# if we partitioned, we do this:
+#btrbk-run -t $host archive
+btrbk-run -t $host
 dsremote $host
index e063ab2b4a37fce0dbaa9108d2ec3dd1028992e4..e1b0b79a7bfbceab8b050cf97fd418af24241eb9 100755 (executable)
@@ -56,9 +56,12 @@ for dev in $(btrfs fi show / | sed -rn 's#^\s*devid\s.*\s([^0-9 ]+)\S+$#\1#p' \
   # for details
   if [[ $(blockdev --getsize64 ${dev}4) == 8388608 ]]; then
     # Old partition scheme
-    dev+=4
+    grub_extn=${dev}4
+  elif [[ $(blockdev --getsize64 ${dev}5) == 8388608 ]]; then
+    grub_extn=${dev}5
   else
-    dev+=5
+    grub_extn=${dev}7
+  fi
   fi
   mount $dev /mnt
   if $first; then
index f98e59556cb8dc338a0c6a3eb6e96344d2c4e68c..a058acc21ae788a3e63dcfb309ee94d3ee26db78 100755 (executable)
@@ -65,16 +65,17 @@ fi
 # RAID1: forces raid1 filesystem.
 
 mkroot2=false
-case $1 in
-  mkroot2)
-    mkroot2=true
-    ;;
-  *)
-    echo "$0: error: unsupported arg: $1" >&2
-    exit 1
-    ;;
-esac
-
+if [[ $1 ]]; then
+  case $1 in
+    mkroot2)
+      mkroot2=true
+      ;;
+    *)
+      echo "$0: error: unsupported arg: $1" >&2
+      exit 1
+      ;;
+  esac
+fi
 
 
 if [[ $SPECIAL_DISK ]]; then