aboutsummarylogtreecommitdiffstats
path: root/10-linux-modules-post.hook
diff options
context:
space:
mode:
authorsaber-nyan2018-09-09 12:52:36 +0300
committersaber-nyan2018-09-09 12:52:36 +0300
commit5eef5a9787da5fcf978585f94f1d09d300fbcb6f (patch)
tree8d3319fa858ae77eb1fd48f37c805c5b9a04651d /10-linux-modules-post.hook
parenta43cd6bca2bbe65440f544e5f08d53b96c870903 (diff)
downloadaur-5eef5a9787da5fcf978585f94f1d09d300fbcb6f.tar.gz
Run ALPM-hooks before everything else
Closes #2
Diffstat (limited to '10-linux-modules-post.hook')
-rw-r--r--10-linux-modules-post.hook14
1 files changed, 14 insertions, 0 deletions
diff --git a/10-linux-modules-post.hook b/10-linux-modules-post.hook
new file mode 100644
index 000000000000..b4d15d1ae8ce
--- /dev/null
+++ b/10-linux-modules-post.hook
@@ -0,0 +1,14 @@
+[Trigger]
+Operation = Upgrade
+Type = Package
+Target = linux
+Target = linux-hardened
+Target = linux-lts
+Target = linux-zen
+
+[Action]
+Description = Restore Linux kernel modules
+When = PostTransaction
+Depends = coreutils
+Depends = rsync
+Exec = /bin/sh -xc 'KVER="${KVER:-$(uname -r)}"; if test -e "/lib/modules/backup/${KVER}"; then rsync -AHXal --ignore-existing "/lib/modules/backup/${KVER}" /lib/modules/; fi; rm -rf /lib/modules/backup'