git://git.onelab.eu
/
bootcd.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
11909e6
)
do not try to load blacklisted modules
author
S.Çağlar Onur
<caglar@verivue.com>
Tue, 1 Mar 2011 19:56:50 +0000
(14:56 -0500)
committer
S.Çağlar Onur
<caglar@verivue.com>
Tue, 1 Mar 2011 19:58:48 +0000
(14:58 -0500)
initscripts/pl_hwinit
patch
|
blob
|
history
diff --git
a/initscripts/pl_hwinit
b/initscripts/pl_hwinit
index
80f2849
..
2c0a7aa
100755
(executable)
--- a/
initscripts/pl_hwinit
+++ b/
initscripts/pl_hwinit
@@
-31,6
+31,18
@@
def main(argv):
else:
path = "/lib/modules/%s/modules.pcimap" % kernel
else:
path = "/lib/modules/%s/modules.pcimap" % kernel
+ blacklisted_modules = []
+ blacklists = ("blacklist", "blacklist-compat", "blacklist-firewire")
+ for blacklist in blacklists:
+ blf = "/etc/modprobe.d/%s" % blacklist
+ if os.path.exists(blf):
+ f = open(blf)
+ for i in f.readlines():
+ if i.startswith("blacklist"):
+ blacklisted_modules.append(i.split()[1])
+ # unify the list
+ blacklisted_modules = list(set(blacklisted_modules))
+
pcimap = pypcimap.PCIMap(path)
print now(),"pl_hwinit: loading applicable modules"
devices = pypci.get_devices()
pcimap = pypcimap.PCIMap(path)
print now(),"pl_hwinit: loading applicable modules"
devices = pypci.get_devices()
@@
-54,8
+66,9
@@
def main(argv):
# FIXME: This needs improved logic in the case of multiple matching modules
for module in modules:
# FIXME: This needs improved logic in the case of multiple matching modules
for module in modules:
- print now(),"pl_hwinit: found and loading module %s (%s)" % (module, slot)
- modprobe(module)
+ if module not in blacklisted_modules:
+ print now(),"pl_hwinit: found and loading module %s (%s)" % (module, slot)
+ modprobe(module)
if network_devices == 0:
print now(),"pl_hwinit: no supported network devices found!"
if network_devices == 0:
print now(),"pl_hwinit: no supported network devices found!"