mirror of
https://github.com/valitydev/salt.git
synced 2024-11-08 01:18:58 +00:00
Merge pull request #5783 from pille/kmod-is_loaded
add kmod.is_loaded to check if a kernel module is currently loaded.
This commit is contained in:
commit
ab16cbb688
@ -210,6 +210,17 @@ def load(mod, persist=False):
|
||||
return 'Module {0} not found'.format(mod)
|
||||
|
||||
|
||||
def is_loaded(mod):
|
||||
'''
|
||||
Check to see if the specified kernel module is loaded
|
||||
|
||||
CLI Example::
|
||||
|
||||
salt '*' kmod.is_loaded kvm
|
||||
'''
|
||||
return mod in mod_list()
|
||||
|
||||
|
||||
def remove(mod, persist=False, comment=True):
|
||||
'''
|
||||
Remove the specified kernel module
|
||||
|
Loading…
Reference in New Issue
Block a user