BiteDasher / kesboot

Script for automating work with EFI Kernel Stub (linux)
MIT License
25 stars 3 forks source link

pacman uninstall hook missed kernel with prefix #12

Open zeners opened 7 months ago

zeners commented 7 months ago

when uninstalling a kernel, the efi-var can't be found:

# mhwd-kernel -r linux67                                                                                                      ✔ 
...
:: Pre-transaction-Hooks werden gestartet …
(1/3) Removing linux initcpios...
(2/3) Updating EFI variables (remove)...
Can't find the builduser kernel in the EFI variables...
...

if i read the source correctly, "builduser" should be the name of the kernel to be removed?

zeners commented 7 months ago

for successful kernel uninstall, i added 2 parts in main.sh:_remove_efi_hook: after _strings="${_strings%%/*}" added:

        local _version_backup
        _version_backup="$(echo "$_strings" | cut -d "." -f 1,2)"

and after _final="${_final#(}" added:

        if [ "$_final" == "builduser" ]; then
            _final="${_version_backup}-$(uname -m)"
        fi

i'm unsure thats going wrong, but it looks like the kernel doesn't contain the expected string

now i'm get:

(2/3) Updating EFI variables (remove)...
===> Removed 6.7-x86_64