aboutsummarylogtreecommitdiffstats
path: root/10-zectl-pre.hook
diff options
context:
space:
mode:
Diffstat (limited to '10-zectl-pre.hook')
-rw-r--r--10-zectl-pre.hook11
1 files changed, 11 insertions, 0 deletions
diff --git a/10-zectl-pre.hook b/10-zectl-pre.hook
new file mode 100644
index 000000000000..69852b4dedd6
--- /dev/null
+++ b/10-zectl-pre.hook
@@ -0,0 +1,11 @@
+[Trigger]
+Operation = Remove
+Operation = Install
+Operation = Upgrade
+Type = Package
+Target = *
+
+[Action]
+Description = Create a boot environment
+When = PreTransaction
+Exec = /usr/bin/bash -c 'if [[ $(/usr/bin/zectl get -H pacmanhook) =~ yes ]];then /usr/share/libalpm/scripts/zectl-prune ; fi'