mirror of
https://git.proxmox.com/git/pve-kernel-meta
synced 2025-05-02 06:13:28 +00:00

As explained in [0], we can add a hook script that will be called after update-initramfs did its job (and thus, a new initrd has been created). We can use this to automatically sync the ESPs using 'pve-efiboot-tool refresh', if update-initramfs was called manually (on kernel upgrade we already have a hook that does this). [0]: https://kernel-team.pages.debian.net/kernel-handbook/ch-update-hooks.html Signed-off-by: Stefan Reiter <s.reiter@proxmox.com>
12 lines
390 B
Bash
12 lines
390 B
Bash
#! /bin/sh
|
|
|
|
set -e
|
|
|
|
# Only run the refresh if update-initramfs has been called manually.
|
|
# If this script is being run as part of a post-kernel-install hook,
|
|
# this variable will be set to 1 and we do nothing, since our pve-kernel
|
|
# hooks will update the ESPs all at once anyway.
|
|
if [ -z "$INITRAMFS_TOOLS_KERNEL_HOOK" ]; then
|
|
/usr/sbin/pve-efiboot-tool refresh --hook 'zz-pve-efiboot'
|
|
fi
|