From e5818c73628ee286c335ad965d0bcfda5bca453e Mon Sep 17 00:00:00 2001 From: BrainwreckedTech <3752022+BrainwreckedTech@users.noreply.github.com> Date: Tue, 17 Sep 2019 20:28:13 -0400 Subject: [PATCH] First sync --- 00-autosnap-zfs.hook | 14 ++++++++++++++ 89-rename-lts-kernel.hook | 10 ++++++++++ 89-rename-zen-kernel.hook | 10 ++++++++++ nvidia.hook | 12 ++++++++++++ orphans.hook | 10 ++++++++++ refind.hook | 9 +++++++++ systemd-boot.hook | 9 +++++++++ 7 files changed, 74 insertions(+) create mode 100644 00-autosnap-zfs.hook create mode 100644 89-rename-lts-kernel.hook create mode 100644 89-rename-zen-kernel.hook create mode 100644 nvidia.hook create mode 100644 orphans.hook create mode 100644 refind.hook create mode 100644 systemd-boot.hook diff --git a/00-autosnap-zfs.hook b/00-autosnap-zfs.hook new file mode 100644 index 0000000..79b34a4 --- /dev/null +++ b/00-autosnap-zfs.hook @@ -0,0 +1,14 @@ +[Trigger] +Type=Package +Operation=Install +Operation=Upgrade +Operation=Remove +Target=* + +[Action] +Description=Making ZFS snapshot... +Depends=zfs-utils +When=PreTransaction +Exec=/usr/bin/sh -c "/usr/bin/zfs snapshot -r $(/usr/bin/findmnt -n / | /usr/bin/awk '{print $2}')@$(date +%Y-%m-%d_%H-%M-%S)_pacman_pre" +AbortOnFail +NeedsTargets diff --git a/89-rename-lts-kernel.hook b/89-rename-lts-kernel.hook new file mode 100644 index 0000000..bd097c6 --- /dev/null +++ b/89-rename-lts-kernel.hook @@ -0,0 +1,10 @@ +[Trigger] +Type = File +Operation = Install +Operation = Upgrade +Target = /boot/vmlinuz-linux-lts + +[Action] +Description = Renaming vmlinuz-linux-lts to resc-lts.krn... +When = PostTransaction +Exec = /usr/bin/mv /boot/vmlinuz-linux-lts /boot/resc-lts.krn diff --git a/89-rename-zen-kernel.hook b/89-rename-zen-kernel.hook new file mode 100644 index 0000000..b2f4ac4 --- /dev/null +++ b/89-rename-zen-kernel.hook @@ -0,0 +1,10 @@ +[Trigger] +Type = File +Operation = Install +Operation = Upgrade +Target = boot/vmlinuz-linux-zen + +[Action] +Description = Renaming vmlinuz-linux-zen to arch-zen.krn... +When = PostTransaction +Exec = /usr/bin/mv /boot/vmlinuz-linux-zen /boot/arch-zen.krn diff --git a/nvidia.hook b/nvidia.hook new file mode 100644 index 0000000..84fa42c --- /dev/null +++ b/nvidia.hook @@ -0,0 +1,12 @@ +[Trigger] +Operation=Install +Operation=Upgrade +Operation=Remove +Type=Package +Target=nvidia + +[Action] +Depends=mkinitcpio +When=PostTransaction +Exec=/usr/bin/mkinitcpio -P + diff --git a/orphans.hook b/orphans.hook new file mode 100644 index 0000000..d0e1068 --- /dev/null +++ b/orphans.hook @@ -0,0 +1,10 @@ +[Trigger] +Operation=Install +Operation=Upgrade +Type=Package +Target=* + +[Action] +Description=Finding orphans... +When=PostTransaction +Exec=/usr/bin/bash -c 'echo -e "=> None found.\r=> $(pacman -Qqtd | tr "\n" " ")"' diff --git a/refind.hook b/refind.hook new file mode 100644 index 0000000..3a3b17b --- /dev/null +++ b/refind.hook @@ -0,0 +1,9 @@ +[Trigger] +Operation=Upgrade +Type=Package +Target=refind-efi + +[Action] +Description = Updating rEFInd on ESP +When=PostTransaction +Exec=/usr/bin/refind-install diff --git a/systemd-boot.hook b/systemd-boot.hook new file mode 100644 index 0000000..cf49207 --- /dev/null +++ b/systemd-boot.hook @@ -0,0 +1,9 @@ +[Trigger] +Type = File +Operation = Upgrade +Target = boot/EFI/systemd/systemd-bootx64.efi + +[Action] +Description = Upgrading systemd-boot... +When = PostTransaction +Exec = /usr/bin/bootctl update