From f77aca86b8063f9f82e28947112f4975a63d94a3 Mon Sep 17 00:00:00 2001 From: EnumDev Date: Sat, 23 Aug 2025 19:40:53 +0300 Subject: [PATCH] Add update-grub script --- pkg.info | 2 +- source-files/20-grub.bpmhook | 2 +- source-files/update-grub.sh | 3 +++ source.sh | 3 +++ 4 files changed, 8 insertions(+), 2 deletions(-) create mode 100644 source-files/update-grub.sh diff --git a/pkg.info b/pkg.info index 8a3b545..1a8374b 100644 --- a/pkg.info +++ b/pkg.info @@ -1,7 +1,7 @@ name: grub description: The GRand Unified Bootloader version: 2.12 -revision: 6 +revision: 7 url: https://www.gnu.org/software/grub/ license: GPL3-or-later architecture: any diff --git a/source-files/20-grub.bpmhook b/source-files/20-grub.bpmhook index 427f1a7..170491a 100644 --- a/source-files/20-grub.bpmhook +++ b/source-files/20-grub.bpmhook @@ -2,4 +2,4 @@ trigger_operations: ["install", "upgrade", "remove"] target_type: "path" targets: ["boot/vmlinu*"] depends: ["grub"] -run: "grub-mkconfig -o /boot/grub/grub.cfg" +run: "/usr/sbin/update-grub" diff --git a/source-files/update-grub.sh b/source-files/update-grub.sh new file mode 100644 index 0000000..f24aa43 --- /dev/null +++ b/source-files/update-grub.sh @@ -0,0 +1,3 @@ +#!/bin/sh + +grub-mkconfig -o /boot/grub/grub.cfg diff --git a/source.sh b/source.sh index 14e11a3..c65a3d5 100644 --- a/source.sh +++ b/source.sh @@ -56,6 +56,9 @@ package() { # Install grub default file install -Dm644 "$BPM_WORKDIR"/grub.default "$BPM_OUTPUT"/etc/default/grub + # Install update-grub script + install -Dm755 "$BPM_WORKDIR"/update-grub.sh "$BPM_OUTPUT"/usr/sbin/update-grub + # Install BPM hook install -Dm644 "$BPM_WORKDIR"/20-grub.bpmhook "$BPM_OUTPUT"/var/lib/bpm/hooks/20-grub.bpmhook