-
-
Notifications
You must be signed in to change notification settings - Fork 18
Expand file tree
/
Copy pathdeploy-bootloader
More file actions
executable file
·32 lines (28 loc) · 1.29 KB
/
deploy-bootloader
File metadata and controls
executable file
·32 lines (28 loc) · 1.29 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
#!/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
# workaround for NVMe drive power saving bug is needed for lon.grapheneos.org
# standalone intel-ucode.img is needed for yto.grapheneos.org
if [[ $host != @(lon.grapheneos.org|yto.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
elif [[ ${hosts_type[$host]:-vps} != container ]]; then
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