void-packages/srcpkgs/gummiboot/files/kernel.d/gummiboot.post-remove

22 lines
389 B
Text
Raw Normal View History

2014-09-05 11:26:39 +00:00
#!/bin/sh
#
# Kernel hook for gummiboot.
#
# Arguments passed to this script: $1 pkgname, $2 version.
#
PKGNAME="$1"
VERSION="$2"
boot=$ROOTDIR/boot
entries=$boot/loader/entries
name=void-$VERSION
2014-09-05 11:26:39 +00:00
entry=$entries/$name.conf
loader=$boot/loader/loader.conf
[ -d $boot ] || exit 0
rm -f $entry
# No default entry if the removed entry was the default:
sed -i "/^default $name\$/d" $loader