mirror of
				https://github.com/ansible-collections/community.general.git
				synced 2024-09-14 20:13:21 +02:00 
			
		
		
		
	Normalise the module name when comparing against the module names in /proc/modules.
This commit is contained in:
		
							parent
							
								
									125e9d4703
								
							
						
					
					
						commit
						8131feaade
					
				
					 1 changed files with 2 additions and 1 deletions
				
			
		|  | @ -60,8 +60,9 @@ def main(): | |||
|     try: | ||||
|         modules = open('/proc/modules') | ||||
|         present = False | ||||
|         module_name = args['name'].replace('-', '_') + ' ' | ||||
|         for line in modules: | ||||
|             if line.startswith(args['name'] + ' '): | ||||
|             if line.startswith(module_name): | ||||
|                 present = True | ||||
|                 break | ||||
|         modules.close() | ||||
|  |  | |||
		Loading…
	
	Add table
		
		Reference in a new issue