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:
Joseph Hall 2013-06-27 10:52:47 -07:00
commit ab16cbb688

View File

@ -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