diff options
author | Mike Sullivan <mksully22@gmail.com> | 2018-06-13 15:29:24 +0000 |
---|---|---|
committer | Natanael Copa <ncopa@alpinelinux.org> | 2018-06-13 18:12:41 +0000 |
commit | 70ef88bae9e9704e184ea93f19efd3a7b82cfc92 (patch) | |
tree | 806b6fcbff928da177ce1425009cda95063adf02 /main/grub | |
parent | d4b20601536ebea309f3ae8b3b36a5fc4c77abae (diff) | |
download | aports-70ef88bae9e9704e184ea93f19efd3a7b82cfc92.tar.bz2 aports-70ef88bae9e9704e184ea93f19efd3a7b82cfc92.tar.xz |
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
Diffstat (limited to 'main/grub')
-rw-r--r-- | main/grub/APKBUILD | 3 | ||||
-rw-r--r-- | main/grub/grub.trigger | 10 |
2 files changed, 12 insertions, 1 deletions
diff --git a/main/grub/APKBUILD b/main/grub/APKBUILD index be8067f16e..3a65f9b2fb 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 0000000000..004b84e5fc --- /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 |