diff options
author | Lucas De Marchi <lucas.demarchi@intel.com> | 2021-01-18 18:22:31 -0800 |
---|---|---|
committer | Lucas De Marchi <lucas.demarchi@intel.com> | 2021-01-18 18:26:36 -0800 |
commit | 9319b0f4cba5be851ae6ceced394f445b30bf07d (patch) | |
tree | 7588abc8238c03d5dcc5f3d77a8f810b5d09c5dd /libkmod/libkmod.c | |
parent | 1c10f3248378af987243049e0220964e3bdbbac0 (diff) | |
download | kmod-9319b0f4cba5be851ae6ceced394f445b30bf07d.tar.gz kmod-9319b0f4cba5be851ae6ceced394f445b30bf07d.tar.bz2 kmod-9319b0f4cba5be851ae6ceced394f445b30bf07d.zip |
Support /usr/local for configuration files
Add /usr/local to the search path for configuration files. These are
intended for local installs, provided /usr/local is given as prefix.
Diffstat (limited to 'libkmod/libkmod.c')
-rw-r--r-- | libkmod/libkmod.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/libkmod/libkmod.c b/libkmod/libkmod.c index 25655b9..7c2b889 100644 --- a/libkmod/libkmod.c +++ b/libkmod/libkmod.c @@ -64,6 +64,7 @@ static struct _index_files { static const char *default_config_paths[] = { SYSCONFDIR "/modprobe.d", "/run/modprobe.d", + "/usr/local/lib/modprobe.d", "/lib/modprobe.d", NULL }; @@ -234,10 +235,11 @@ static char *get_kernel_release(const char *dirname) * Otherwise, give an absolute dirname. * @config_paths: ordered array of paths (directories or files) where * to load from user-defined configuration parameters such as - * alias, blacklists, commands (install, remove). If - * NULL defaults to /etc/modprobe.d, /run/modprobe.d and - * /lib/modprobe.d. Give an empty vector if configuration should - * not be read. This array must be null terminated. + * alias, blacklists, commands (install, remove). If NULL + * defaults to /etc/modprobe.d, /run/modprobe.d, + * /usr/local/lib/modprobe.d and /lib/modprobe.d. Give an empty + * vector if configuration should not be read. This array must + * be null terminated. * * Create kmod library context. This reads the kmod configuration * and fills in the default values. |