kernel pinning: note when overriding previous pin

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
This commit is contained in:
Thomas Lamprecht 2022-03-04 11:05:23 +01:00
parent 33cbbb5a32
commit 4e4a9eb9d0

View File

@ -443,6 +443,13 @@ pin_kernel() {
warn "$boot_kernels"
exit 1
fi
if [ -e "$pin_file" ]; then
old_pin=$(get_first_line "${pin_file}")
if [ "$ver" != "$old_pin" ]; then
echo "Overriding previously pinned version '$old_pin' with '$ver'"
fi
fi
echo "$ver" > "$pin_file"
if [ -f "${ESP_LIST}" ]; then