From a4ebc91548192c03696044705b39a84203bc5640 Mon Sep 17 00:00:00 2001 From: "Eshan Roy (Eshanized)" Date: Thu, 7 Mar 2024 11:39:56 +0530 Subject: [PATCH] @eshanized: push via push.sh!!! --- etc/pacman.d/hooks/grub-install.hook | 9 +++++++++ local/bin/snigdhaos-systemd-test | 10 ++++++++++ 2 files changed, 19 insertions(+) create mode 100644 etc/pacman.d/hooks/grub-install.hook create mode 100644 local/bin/snigdhaos-systemd-test diff --git a/etc/pacman.d/hooks/grub-install.hook b/etc/pacman.d/hooks/grub-install.hook new file mode 100644 index 0000000..3f630d8 --- /dev/null +++ b/etc/pacman.d/hooks/grub-install.hook @@ -0,0 +1,9 @@ +[Trigger] +Operation = Upgrade +Type = Package +Target = grub + +[Action] +Description = Executing grub-install - not when on systemd-boot +When = PostTransaction +Exec = /usr/local/bin/snigdhaos-systemd-test diff --git a/local/bin/snigdhaos-systemd-test b/local/bin/snigdhaos-systemd-test new file mode 100644 index 0000000..7cdc136 --- /dev/null +++ b/local/bin/snigdhaos-systemd-test @@ -0,0 +1,10 @@ +#!/bin/bash + +#set -e + +boot=$(bootctl status | grep Product | awk '{printf($2)}') +echo "The system is using $boot to boot." + +if [ $boot = "GRUB" ]; then + /usr/bin/grub-install --target=x86_64-efi --efi-directory=/boot/efi --bootloader-id=snigdhaos --disable-shim-lock --removable +fi