aboutsummaryrefslogtreecommitdiffstats
path: root/main/grub/grub.trigger
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 /main/grub/grub.trigger
parentd4b20601536ebea309f3ae8b3b36a5fc4c77abae (diff)
downloadaports-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.trigger10
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