mirror of
https://git.proxmox.com/git/systemd
synced 2025-08-14 06:21:53 +00:00

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
21 lines
496 B
Bash
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#
|