+ blacklisted_modules = []
+ blacklists = os.listdir("/etc/modprobe.d")
+ 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))
+