From: Lucas De Marchi Date: Tue, 19 Jan 2021 02:22:31 +0000 (-0800) Subject: Support /usr/local for configuration files X-Git-Tag: v29~17 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=9319b0f4cba5be851ae6ceced394f445b30bf07d;p=platform%2Fupstream%2Fkmod.git 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. --- 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. diff --git a/man/depmod.d.xml b/man/depmod.d.xml index 6472bda..b315e93 100644 --- a/man/depmod.d.xml +++ b/man/depmod.d.xml @@ -40,6 +40,7 @@ /usr/lib/depmod.d/*.conf + /usr/local/lib/depmod.d/*.conf /run/depmod.d/*.conf /etc/depmod.d/*.conf diff --git a/man/modprobe.d.xml b/man/modprobe.d.xml index a674d69..0ab3e91 100644 --- a/man/modprobe.d.xml +++ b/man/modprobe.d.xml @@ -41,6 +41,7 @@ /lib/modprobe.d/*.conf + /usr/local/lib/modprobe.d/*.conf /run/modprobe.d/*.conf /etc/modprobe.d/*.conf diff --git a/tools/depmod.c b/tools/depmod.c index 8e1d9ec..170a1d8 100644 --- a/tools/depmod.c +++ b/tools/depmod.c @@ -53,6 +53,7 @@ static const char CFG_EXTERNAL_KEY[] = "external"; static const char *default_cfg_paths[] = { SYSCONFDIR "/depmod.d", "/run/depmod.d", + "/usr/local/lib/depmod.d", "/lib/depmod.d", NULL };