pve-kernel-meta/proxmox-boot/000_proxmox_boot_header
Stoiko Ivanov dc3e3e5ca7 proxmox-boot: redirect stdout in update-grub snippet
update-grub (via grub-mkconfig) generates the grub configuration by
concatenating the output of each snippet (from /etc/grub.d).

We need to redirect the output of `proxmox-boot-tool refresh`
to not end up with a syntactically wrong config in /boot/grub/grub.cfg
(which is not used in any case)

quickly tested with a test-installation of mine

Signed-off-by: Stoiko Ivanov <s.ivanov@proxmox.com>
2021-06-24 14:21:01 +02:00

25 lines
722 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: Executing 'update-grub' directly does not update the correct configs!"
warn "W: Running: 'proxmox-boot-tool refresh'"
warn ""
proxmox-boot-tool refresh > /dev/null
fi
fi