Skip to content

Fix bashisms in kernel-install scripts

Denis Pynkin requested to merge wip/d4s/kernel_install_fixes into apertis/v2022dev2
  • Fix bashisms in kernel-install scripts.

    Remove negotiation from -z to test for non-emptiness instead of previously added version reversing those tests logic.

  • kernel-install: allow to create BOOT/MACHINE_ID.

    Commit cf73f650890 provides script 00-entry-directory.install which creates the entry directory only if $BOOT/$MACHINE_ID folder exists. This part was moved out of kernel-install script and may introduce the problem during upgrade since before Apertis v2022dev2 we do kernel install with $MACHINE_ID generated in a build time. Later we remove /etc/machine-id file allowing to generate an unique machine ID during first boot, so there will be no directory $BOOT/$MACHINE_ID with a new ID preventing from new entry generation during kernel upgrade in runtime. Hence remove the part checking the $BOOT/$MACHINE_ID existence and allow to create the proper entry in any case, returning the previous kernel-install behaviour.

  • Fix kernel-install call from update-initramfs.

    Fix parameters assignment in kernel-install while calling from update-initramfs or any package update except kernel.

  • 85-initrd: fix the args number

    kernel-install pass 5 args to modules anyway, so empty argument do not allow to install the initrd file into boot entry directory. Since we do not pass the initrd name via options module 90-loaderentry.install also skip the initrd copying and setup.

  • Refresh patch for UEFI entries generator.

    Update names for entry directories variables and fix options count.

  • Fix the path to bootable binaries in efi entry

    stat doesn't work well due coreutils-gplv2 created by Debos returning "?" instead of mount point. Fall back to the provided directory, since we have separate partition for "/boot/efi". This change allow to use correct paths for kernel and initrd for entry generation.

Edited by Denis Pynkin

Merge request reports