mirror of
https://git.proxmox.com/git/pve-kernel-meta
synced 2025-04-29 18:23:42 +00:00
proxmox-boot: ignore call to grub-install from grub maintscripts
in certain cases the postinst script of grub-pc runs grub-install on the disks it gets from debconf. Simply warn and exit with 0 if grub-install is called by dpkg and from a grub related package Signed-off-by: Stoiko Ivanov <s.ivanov@proxmox.com>
This commit is contained in:
parent
dc3e3e5ca7
commit
7559f23996
@ -4,6 +4,12 @@ set -e
|
|||||||
. /usr/share/pve-kernel-helper/scripts/functions
|
. /usr/share/pve-kernel-helper/scripts/functions
|
||||||
|
|
||||||
if proxmox-boot-tool status --quiet; then
|
if proxmox-boot-tool status --quiet; then
|
||||||
|
#detect when being called by dpkg (e.g. grub-pc.postinst
|
||||||
|
if [ -n "$DPKG_RUNNING_VERSION" ] && \
|
||||||
|
echo "$DPKG_MAINTSCRIPT_PACKAGE" | grep -sq "^grub-"; then
|
||||||
|
warn "This system is booted via proxmox-boot-tool, ignoring dpkg call to grub-install"
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
warn "grub-install is disabled because this system is booted via proxmox-boot-tool, if you really need to run it, run /usr/sbin/grub-install.real"
|
warn "grub-install is disabled because this system is booted via proxmox-boot-tool, if you really need to run it, run /usr/sbin/grub-install.real"
|
||||||
exit 1
|
exit 1
|
||||||
else
|
else
|
||||||
|
Loading…
Reference in New Issue
Block a user