summaryrefslogtreecommitdiff
path: root/staging/kmod/0001-split-usr-read-configs-from-lib-depmod.d-modprobe.d.patch
blob: bf2c3501f016e46c27aacee1ee3812bc64dc47e9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
From 666ba68a0635048aea0db70cd9ec61aea9b61ed2 Mon Sep 17 00:00:00 2001
From: Tom Gundersen <teg@jklm.no>
Date: Sat, 3 Mar 2012 12:37:06 +0100
Subject: [PATCH 1/2] split usr: read configs from /lib/{depmod.d,modprobe.d}

This allows rootprefix to be set to /usr, even if not all other packages
have been fixed to read from this dir.
---
 libkmod/libkmod.c   |    5 +++--
 tools/kmod-depmod.c |    1 +
 2 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/libkmod/libkmod.c b/libkmod/libkmod.c
index 36ca629..12c1112 100644
--- a/libkmod/libkmod.c
+++ b/libkmod/libkmod.c
@@ -62,6 +62,7 @@ static const char *default_config_paths[] = {
 	SYSCONFDIR "/modprobe.d",
 	"/run/modprobe.d",
 	ROOTPREFIX "/lib/modprobe.d",
+	"/lib/modprobe.d",
 	NULL
 };
 
@@ -223,8 +224,8 @@ static char *get_kernel_release(const char *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 /run/modprobe.d, /etc/modprobe.d and
- *                $rootprefix/lib/modprobe.d. Give an empty vector if
+ *                NULL defaults to /run/modprobe.d, /etc/modprobe.d,
+ *                $rootprefix/lib/modprobe.d and /lib/modprobe.d. Give an empty vector if
  *                configuration should not be read. This array must be null
  *                terminated.
  *
diff --git a/tools/kmod-depmod.c b/tools/kmod-depmod.c
index 1871e18..7bb1c5d 100644
--- a/tools/kmod-depmod.c
+++ b/tools/kmod-depmod.c
@@ -58,6 +58,7 @@ static const char *default_cfg_paths[] = {
 	"/run/depmod.d",
 	SYSCONFDIR "/depmod.d",
 	ROOTPREFIX "/lib/depmod.d",
+	"/lib/depmod.d",
 	NULL
 };
 
-- 
1.7.9.5