summaryrefslogtreecommitdiff
path: root/config-parabola-mgmt-grub.PKGBUILD
diff options
context:
space:
mode:
Diffstat (limited to 'config-parabola-mgmt-grub.PKGBUILD')
-rw-r--r--config-parabola-mgmt-grub.PKGBUILD34
1 files changed, 34 insertions, 0 deletions
diff --git a/config-parabola-mgmt-grub.PKGBUILD b/config-parabola-mgmt-grub.PKGBUILD
new file mode 100644
index 0000000..c3621db
--- /dev/null
+++ b/config-parabola-mgmt-grub.PKGBUILD
@@ -0,0 +1,34 @@
+. ${BUILDFILE%/*}/common.sh
+pkgver=20180909
+
+package() {
+preamble
+pkgdesc="Parabola server configuration: Automatically update grub.cfg"
+
+depends+=(grub)
+
+add-file etc/pacman.d/hooks/95-grub-config.hook <<-'EOF'
+ [Trigger]
+ Type = File
+ Operation = Install
+ Operation = Upgrade
+ Operation = Remove
+ Target = boot/*
+ Target = etc/grub.d/*
+ Target = etc/default/grub
+ Target = usr/share/holo/files/*/etc/default/grub*
+
+ [Trigger]
+ Type = Package
+ Operation = Install
+ Operation = Upgrade
+ Target = grub
+
+ [Action]
+ Description = Updating GRUB configuration
+ When = PostTransaction
+ Exec = /usr/bin/grub-mkconfig -o /boot/grub/grub.cfg
+ EOF
+
+postamble
+}