diff --git a/arch-graphical-install-auto b/arch-graphical-install-auto index 87e6355..b93c929 100755 --- a/arch-graphical-install-auto +++ b/arch-graphical-install-auto @@ -581,6 +581,15 @@ if ! grep '#!' $RCLOCAL; then echo "#!/bin/bash" > $RCLOCAL fi +# Install rc.shutdown + +echo "#!/bin/bash" > /etc/rc.local.shutdown +if [ "${version}" == "manjaro" ]; then + cp /opt/${repo}/update-bootloader /usr/bin/update-bootloader + chmod +x /usr/bin/update-bootloader + echo "/usr/bin/update-bootloader" >> /etc/rc.local.shutdown +fi + if [ "$version" != "lite" ]; then ### custom-installer diff --git a/arch-install b/arch-install index 342d031..e52ccab 100755 --- a/arch-install +++ b/arch-install @@ -691,6 +691,13 @@ function systemdboot() { echo "default arch-uefi" > ${mountpoint}/boot/loader/loader.conf echo "timeout 1" >> ${mountpoint}/boot/loader/loader.conf + # update-bootloader + echo "title "${repo}"" > ${mountpoint}/boot/arch-uefi.conf.example + echo "linux /%LINUZ%" >> ${mountpoint}/boot/arch-uefi.conf.example + echo "initrd /intel-ucode.img" >> ${mountpoint}/boot/arch-uefi.conf.example + echo "initrd /%KERNEL%" >> ${mountpoint}/boot/arch-uefi.conf.example + echo "options root=${tobootdevice} rw ${parameter}quiet splash" >> ${mountpoint}/boot/arch-uefi.conf.example + if [ "${booteintraege}" != "n" ]; then echo "Additional boot entries are created !!!" diff --git a/startup b/startup index 85469cc..0acf54c 100755 --- a/startup +++ b/startup @@ -2,7 +2,7 @@ echo "Start!!!" -date >> /startup.txt +date >> /startup.log if [ -f /usr/bin/run ] then diff --git a/update-bootloader b/update-bootloader new file mode 100755 index 0000000..c02c206 --- /dev/null +++ b/update-bootloader @@ -0,0 +1,18 @@ +#!/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