Fixed return error due to not being contained within function

This commit is contained in:
optout 2024-04-12 16:34:07 +00:00
parent 88897ae59f
commit a7cb3530eb
No known key found for this signature in database
GPG Key ID: 13BA4BD4C14170C0
1 changed files with 12 additions and 6 deletions

View File

@ -103,18 +103,20 @@ fi
make -j $(nproc --all)
make modules_install INSTALL_MOD_STRIP=1 install
function install_kernel() {
declare -r distroId="$(awk -F= '$1=="ID"{print $NF}' /etc/os-release)"
case "${distroId,,}" in
*void*)
cp ./arch/x86_64/boot/bzImage /boot/vmlinuz-"$KVER"
dracut --kver "$KVER" --force
grub-mkconfig -o /boot/grub/grub.cfg
xbps-reconfigure -fa
/usr/bin/update-grub
dracut --kver "$KVER" --force
grub-mkconfig -o /boot/grub/grub.cfg
xbps-reconfigure -fa
/usr/bin/update-grub
return 0
;;
*debian*|*ubuntu*)
cp ./arch/x86_64/boot/bzImage /boot/vmlinuz-"$KVER"
dracut --kver "$KVER" --force
dracut --kver "$KVER" --force
update-grub2
return 0
;;
@ -126,7 +128,11 @@ case "${distroId,,}" in
printf '%s\n' "Unable to detect Operating System!" >&2
return 1
;;
esac
esac
}
install_kernel
# Remove sysmap/signing keys