SpectreOS-old/update-bootloader

19 lines
585 B
Text
Raw Normal View History

2018-05-05 00:20:09 +02:00
#!/bin/bash
set -ex
kernel1="$(find /boot/ -name "initramfs*$(uname -m).img")"
linuz1="$(find /boot/ -name "vmlinuz*$(uname -m)")"
kernel="${kernel1#/*/}"
linuz="${linuz1#/*/}"
kernelback1="$(find /boot/ -name "initramfs*$(uname -m)-fallback.img")"
kernelback="${kernelback1#/*/}"
sed "s|%LINUZ%|${linuz}|g;
s|%KERNEL%|${kernel}|g" /boot/arch-uefi.conf.example > /boot/loader/entries/arch-uefi.conf
sed "s|%LINUZ%|${linuz}|g;
s|%KERNEL%|${kernelback}|g" /boot/arch-uefi.conf.example > /boot/loader/entries/arch-uefi-fallback.conf
echo "Bootloader update $(date)" >> /shutdown.log