#!/bin/bash . shared.sh . hosts.sh for host in ${hosts_all[@]}; do remote=root@$host echo echo $host echo if [[ ${hosts_uefi[$host]:-false} = true ]]; then rsync boot/loader/loader.conf $remote:/boot/loader/loader.conf if [[ ${hosts_mdraid[$host]:-false} = true ]]; then # standalone intel-ucode.img is needed for yto.releases.grapheneos.org if [[ $host != yto.releases.grapheneos.org ]]; then rsync boot/loader/entries/arch-lts{,-fallback}.conf $remote:/boot/loader/entries/ fi ssh $remote "SYSTEMD_RELAX_ESP_CHECKS=1 bootctl install && systemctl enable systemd-boot-update.service" rsync -r --delete etc/systemd/system/systemd-boot-update.service.d $remote:/etc/systemd/system/ else ssh $remote "bootctl install && systemctl enable systemd-boot-update.service" fi else rsync etc/default/grub $remote:/etc/default/grub drive=$(ssh $remote bash -c '[[ -e /dev/sda ]] && echo sda || echo vda') ssh $remote grub-install /dev/$drive ssh $remote grub-mkconfig -o /boot/grub/grub.cfg fi done