Normalise the module name when comparing against the module names in /proc/modules.

reviewable/pr18780/r1
Matt Jeffery 11 years ago committed by Matt Jeffery
parent 54eeac3696
commit 6cfa724472

@ -60,8 +60,9 @@ def main():
try: try:
modules = open('/proc/modules') modules = open('/proc/modules')
present = False present = False
module_name = args['name'].replace('-', '_') + ' '
for line in modules: for line in modules:
if line.startswith(args['name'] + ' '): if line.startswith(module_name):
present = True present = True
break break
modules.close() modules.close()

Loading…
Cancel
Save