aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMike Sullivan <mksully22@gmail.com>2018-06-13 15:29:24 +0000
committerNatanael Copa <ncopa@alpinelinux.org>2018-06-13 18:12:41 +0000
commit70ef88bae9e9704e184ea93f19efd3a7b82cfc92 (patch)
tree806b6fcbff928da177ce1425009cda95063adf02
parentd4b20601536ebea309f3ae8b3b36a5fc4c77abae (diff)
downloadaports-70ef88bae9e9704e184ea93f19efd3a7b82cfc92.tar.bz2
main/grub: add trigger to modify grub.cfg when linux-vanilla kernel is installed
amend grub.trigger to add check for existence of grub.cfg
-rw-r--r--main/grub/APKBUILD3
-rw-r--r--main/grub/grub.trigger10
2 files changed, 12 insertions, 1 deletions
diff --git a/main/grub/APKBUILD b/main/grub/APKBUILD
index be8067f..3a65f9b 100644
--- a/main/grub/APKBUILD
+++ b/main/grub/APKBUILD
@@ -2,12 +2,13 @@
# Maintainer: Timo Teräs <timo.teras@iki.fi>
pkgname=grub
pkgver=2.02
-pkgrel=4
+pkgrel=5
pkgdesc="Bootloader with support for Linux, Multiboot and more"
url="https://www.gnu.org/software/grub/"
arch="all !s390x"
license="GPL-3.0-or-later"
depends=""
+triggers="grub.trigger=/boot"
depends_dev=""
makedepends="$depends_dev bison flex linux-headers xz-dev lvm2-dev
automake autoconf libtool python3 freetype-dev unifont"
diff --git a/main/grub/grub.trigger b/main/grub/grub.trigger
new file mode 100644
index 0000000..004b84e
--- /dev/null
+++ b/main/grub/grub.trigger
@@ -0,0 +1,10 @@
+#!/bin/sh
+if [ -e /boot/grub/grub.cfg ]; then
+ if [ -e /boot/vmlinuz-vanilla ]; then
+ sed -i -e "s/vmlinuz /vmlinuz-vanilla /g" /boot/grub/grub.cfg
+ else
+ if [ -e /boot/vmlinuz ]; then
+ sed -i -e "s/vmlinuz-vanilla/vmlinuz/g" /boot/grub/grub.cfg
+ fi
+ fi
+fi