Repository navigation
|
Not being a dev I'm not sure which would be the correct way of doing this: I created a template for a package that needs a kernel module loaded. I only noticed that because on one system another package was installed that needs the same module so the module was already running. On the second system this was not the case. So, I could either make this other package a runtime dependency for the package in question - even though only the config file to load the kernel module is needed but the package itself is not - or instead let the install process create a config file for the first package to load the same kernel module, which leads to the situation that if both packages are installed independently there are now two config files (in |
Replies: 1 comment 1 reply
|
Hi @gc-user, No harm at all. I would ship your own config file, don't depend on the other package just for its conf. At boot Only thing to watch is the file name. Name it after your package ( post_install() {
vinstall ${FILESDIR}/<yourpkg>.conf 644 usr/lib/modules-load.d
}Good luck with the template! |
Hi @gc-user,
No harm at all. I would ship your own config file, don't depend on the other package just for its conf.
At boot
core-services/02-kmods.shruns void-runit'smodules-load. It reads*.conffrom/etc,/runand/usr/lib/modules-load.d, keeps one file per basename, and passes all modules to a singlemodprobe -ab. If a module is listed in two files, modprobe just sees it twice. For an already loaded module modprobe does nothing and returns 0. That's also why it works on your first system already.Only thing to watch is the file name. Name it after your package (
<yourpkg>.conf), not after the module. If both packages ship the same path, xbps refuses to install the second one because …