mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
sysctl funtions overwrote BIFs
This commit is contained in:
parent
ecef895229
commit
7ad04b9d71
1 changed files with 6 additions and 6 deletions
|
@ -3,12 +3,12 @@ Module for viewing and modifying sysctl paramters
|
|||
'''
|
||||
import subprocess
|
||||
|
||||
def list():
|
||||
def show():
|
||||
'''
|
||||
Return a list of sysctl parameters for this minion
|
||||
|
||||
CLI Example:
|
||||
salt '*' sysctl.list
|
||||
salt '*' sysctl.show
|
||||
'''
|
||||
cmd = 'sysctl -a'
|
||||
ret = {}
|
||||
|
@ -22,7 +22,7 @@ def list():
|
|||
ret[comps[0]] = comps[1]
|
||||
return ret
|
||||
|
||||
def get( name ):
|
||||
def get(name):
|
||||
'''
|
||||
Return a single sysctl parameter for this minion
|
||||
|
||||
|
@ -35,12 +35,12 @@ def get( name ):
|
|||
stdout=subprocess.PIPE).communicate()[0]
|
||||
return out[0]
|
||||
|
||||
def set( name, value ):
|
||||
def assign(name, value):
|
||||
'''
|
||||
Set a single sysctl parameter for this minion
|
||||
Assign a single sysctl parameter for this minion
|
||||
|
||||
CLI Example:
|
||||
salt '*' sysctl.set net.ipv4.ip_forward 1
|
||||
salt '*' sysctl.assign net.ipv4.ip_forward 1
|
||||
'''
|
||||
cmd = 'sysctl -w %s=%s' % ( name, value )
|
||||
ret = {}
|
||||
|
|
Loading…
Add table
Reference in a new issue