DKMS modules are removed before modules are saved
Schrottfresse opened this issue · 1 comments
Hi,
if you are using DKMS modules (like e.g. wireguard or VirtualBox), then those are not saved by the hook. The DKMS hook is run before the kernel-modules-hook. It looks like this (sorry for the german text):
:: Starting pre-transaction hooks...
(1/2) Remove DKMS modules
==> dkms remove wireguard/0.0.20180809 -k 4.18.4-arch1-1-ARCH
(2/2) Save Linux kernel modules
[...]
Reading the man-page alpm-hooks(5)
you are not able to define an order systemd-style (Before=
, After=
). I'm not quite sure, if it's possible to order the alpm-hooks.
Do you have an idea?
BR,
Schrottfresse
Okay, after searching again with some time inbetween I found the relevant part of the man page:
Hooks are run in alphabetical order of their file name, where the ordering ignores the suffix.
Right now it looks like this:
% ls -Alh /usr/share/libalpm/hooks
insgesamt 100K
-rw-r--r-- 1 root root 301 24. Aug 14:47 60-linux.hook
-rw-r--r-- 1 root root 309 27. Mai 23:15 70-dkms-install.hook
-rw-r--r-- 1 root root 432 27. Mai 23:15 70-dkms-remove.hook
...
-rw-r--r-- 1 root root 438 24. Aug 22:38 linux-modules-post.hook
-rw-r--r-- 1 root root 376 24. Aug 22:38 linux-modules-pre.hook
What I would propose is to change the filename of linux-modules-pre.hook
to something like 65-linux-modules-pre.hook
. Then it would be run before the DKMS hooks.