mirror of
https://git.proxmox.com/git/pve-kernel-meta
synced 2025-11-02 15:08:36 +00:00
If the system seems to be booted using proxmox-boot, write a header at the beginning of the grub.cfg generated when running `update-grub` Additionally print a warning in case the script is run interactively. This is determined by checking for DPKG_VERSION, which is set when running as post-inst task (after a kernel install/removal) and for PVE_EFIBOOT_UNSHARED, which is set by proxmox-boot-tool when running `proxmox-boot-tool refresh.` Signed-off-by: Stoiko Ivanov <s.ivanov@proxmox.com>
23 lines
671 B
Bash
Executable File
23 lines
671 B
Bash
Executable File
#! /bin/sh
|
|
set -e
|
|
|
|
. /usr/share/pve-kernel-helper/scripts/functions
|
|
|
|
if proxmox-boot-tool status --quiet; then
|
|
cat <<- EOF
|
|
#
|
|
# This system is booted via proxmox-boot-tool! The grub-config used when
|
|
# booting from the disks configured with proxmox-boot-tool resides on the vfat
|
|
# partitions with UUIDs listed in ${ESP_LIST}.
|
|
# /boot/grub/grub.cfg is NOT read when booting from those disk!
|
|
EOF
|
|
|
|
if [ -z "$DPKG_RUNNING_VERSION" ] && [ -z "$PVE_EFIBOOT_UNSHARED" ]; then
|
|
warn "W: This system is booted via proxmox-boot-tool:"
|
|
warn "W: Running update-grub does not update the correct config!"
|
|
warn "W: Run 'proxmox-boot-tool refresh' instead."
|
|
warn ""
|
|
fi
|
|
fi
|
|
|