systemd/debian/systemd-boot.postinst
Luca Boccassi eb54f39cb4 systemd-boot: hide bootctl output in postinst checks
The checks are there to provide a graceful fallback, there's no need to
print that the ESP cannot be found or such errors when running in
containers or chroots and so on.

Gbp-Dch: ignore
2023-02-28 22:43:02 +00:00

21 lines
496 B
Bash

#!/bin/sh
set -e
if [ "$1" = configure ] && [ -z "$2" ] && bootctl --print-esp-path > /dev/null 2>&1; then
bootctl install --make-machine-id-directory=auto
# register existing kernel(s)
for k in /boot/vmlinuz-* ; do
[ -f "$k" ] || continue
ver=$(basename "$k" | sed s/^vmlinuz-//)
kernel-install add "$ver" "$k"
done
fi
if [ "$1" = configure ] && [ -n "$2" ] && bootctl is-installed > /dev/null 2>&1; then
bootctl update --graceful
fi
#DEBHELPER#