mirror of
https://github.com/void-linux/void-packages.git
synced 2025-09-09 13:32:55 +02:00
32 lines
507 B
Bash
32 lines
507 B
Bash
#!/bin/sh
|
|
#
|
|
# Kernel hook for systemd-boot.
|
|
#
|
|
# Arguments passed to this script: $1 pkgname, $2 version.
|
|
#
|
|
PKGNAME="$1"
|
|
VERSION="$2"
|
|
|
|
. "$ROOTDIR/etc/default/systemd-boot"
|
|
|
|
if [ "$SYSTEMD_BOOT_DISABLE" ]; then
|
|
exit 0
|
|
fi
|
|
|
|
BOOT="${BOOT:-/boot}"
|
|
ESP="${ESP:-"$BOOT"}"
|
|
|
|
BOOT="$ROOTDIR/$BOOT"
|
|
ESP="$ROOTDIR/$ESP"
|
|
|
|
ARCH="$(xbps-uhelper arch)"
|
|
|
|
entries="$ESP/loader/entries"
|
|
name="void-$ARCH-$VERSION"
|
|
entry="$entries/$name.conf"
|
|
|
|
[ -d "$ESP" ] || exit 0
|
|
|
|
rm -f "$entry"
|
|
|
|
echo "Removed systemd-boot entry $entry"
|