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/grub.trigger | |
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/grub.trigger')
-rw-r--r-- | main/grub/grub.trigger | 10 |
1 files changed, 10 insertions, 0 deletions
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 |