From 4a15f52c1cc7732ba49466067a111b9c519a0b9b Mon Sep 17 00:00:00 2001 From: Ian Kelling Date: Fri, 16 Jul 2021 09:44:18 -0400 Subject: [PATCH] minor fixes --- dsfull | 8 +++---- .../files/root/fai-check/VOL_BUSTER_BOOTSTRAP | 7 +++++-- fai/config/hooks/partition.DEFAULT | 21 ++++++++++--------- 3 files changed, 19 insertions(+), 17 deletions(-) diff --git a/dsfull b/dsfull index 593e7d6..709ddab 100755 --- 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 diff --git a/fai/config/files/root/fai-check/VOL_BUSTER_BOOTSTRAP b/fai/config/files/root/fai-check/VOL_BUSTER_BOOTSTRAP index e063ab2..e1b0b79 100755 --- a/fai/config/files/root/fai-check/VOL_BUSTER_BOOTSTRAP +++ b/fai/config/files/root/fai-check/VOL_BUSTER_BOOTSTRAP @@ -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 diff --git a/fai/config/hooks/partition.DEFAULT b/fai/config/hooks/partition.DEFAULT index f98e595..a058acc 100755 --- a/fai/config/hooks/partition.DEFAULT +++ b/fai/config/hooks/partition.DEFAULT @@ -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 -- 2.30.2