%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /lib/python2.7/site-packages/salt/states/
Upload File :
Create Path :
Current File : //lib/python2.7/site-packages/salt/states/cryptdev.pyc

�
���^c@@sndZddlmZmZmZddlZeje�Zddde
edd�Zde
ed�Z
dS(u�
Opening of Encrypted Devices
=======================

Ensure that an encrypted device is mapped with the `mapped` function:

.. code-block:: yaml

    mappedname:
      cryptdev.mapped:
        - device: /dev/sdb1
        - keyfile: /etc/keyfile.key
        - opts:
          - size=256

    swap:
      crypted.mapped:
        - device: /dev/sdx4
        - keyfile: /dev/urandom
        - opts: swap,cipher=aes-cbc-essiv:sha256,size=256

    mappedbyuuid:
      crypted.mapped:
        - device: UUID=066e0200-2867-4ebe-b9e6-f30026ca2314
        - keyfile: /etc/keyfile.key
        - config: /etc/alternate-crypttab

.. versionadded:: 2018.3.0
i(tabsolute_importtprint_functiontunicode_literalsNu
/etc/crypttabunamecC@s�i|d6id6td6dd6}|rH|rHt|d<d|d<|S|r�|dksr|dksr|dkr�t|d<d	|dd
<n�|r4td�}	||	j�kr4|r�tjd�ntd
r�d|d<d|d<q1td|||�}
|
rd|dd
<q1d|dd
<t|d<q4n|r�td
r�td||d|d|d|d|�}|r�|dkr�dj|�|dd<n|dkr�dj|�|dd<q�q�dj|�|dd<t|d<n|S(uk
    Verify that a device is mapped

    name
        The name under which the device is to be mapped

    device
        The device name, typically the device node, such as ``/dev/sdb1``
        or ``UUID=066e0200-2867-4ebe-b9e6-f30026ca2314``.

    keyfile
        Either ``None`` if the password is to be entered manually on boot, or
        an absolute path to a keyfile. If the password is to be asked
        interactively, the mapping cannot be performed with ``immediate=True``.

    opts
        A list object of options or a comma delimited list

    config
        Set an alternative location for the crypttab, if the map is persistent,
        Default is ``/etc/crypttab``

    persist
        Set if the map should be saved in the crypttab, Default is ``True``

    immediate
        Set if the device mapping should be executed immediately. Requires that
        the keyfile not be ``None``, because the password cannot be asked
        interactively. Note that options are not passed through on the initial
        mapping.  Default is ``False``.

    match_on
        A name or list of crypttab properties on which this state should be applied.
        Default is ``name``, meaning that the line is matched only by the name
        parameter. If the desired configuration requires two devices mapped to
        the same name, supply a list of parameters to match on.
    unameuchangesuresultuucommentuJEither persist or immediate must be set, otherwise this state does nothingunoneu-u5Device cannot be mapped immediately without a keyfileu
cryptsetupucryptdev.activeu6Ignore cryptdev configuration when mapping immediatelyutestu"Device would be mapped immediatelyucommmentu
cryptdev.openuDevice mapped using cryptsetupu%Device failed to map using cryptsetupucryptdev.set_crypttabtpasswordtoptionstconfigtmatch_onunewuEntry added in {0}ucrypttabuchangeuExisting entry in {0} changeduUnable to set entry in {0}N(	tTruetFalsetNonet__salt__tkeystlogtwarningt__opts__tformat(tnametdevicetkeyfiletoptsRtpersistt	immediateRtrettactivetcryptsetup_resulttcrypttab_result((s8/usr/lib/python2.7/site-packages/salt/states/cryptdev.pytmapped%sN-



*





	
cC@s+i|d6id6td6dd6}|r�td�}||j�kr�tdrhd|d<d|d	<q�td
|�}|r�d|dd<q�d
|dd<t|d<q�n|r'tdr'td|d|�}|r|dkr$dj|�|dd<q$q'dj|�|dd<t|d<n|S(u�
    Ensure that a device is unmapped

    name
        The name to ensure is not mapped

    config
        Set an alternative location for the crypttab, if the map is persistent,
        Default is ``/etc/crypttab``

    persist
        Set if the map should be removed from the crypttab. Default is ``True``

    immediate
        Set if the device should be unmapped immediately. Default is ``False``.
    unameuchangesuresultuucommentucryptdev.activeutestu$Device would be unmapped immediatelyucommmentucryptdev.closeu Device unmapped using cryptsetupu
cryptsetupu'Device failed to unmap using cryptsetupucryptdev.rm_crypttabRuchangeuEntry removed from {0}ucrypttabuUnable to remove entry in {0}N(RR
RRR	RR(RRRRRRRR((s8/usr/lib/python2.7/site-packages/salt/states/cryptdev.pytunmapped�s.






(t__doc__t
__future__RRRtloggingt	getLoggert__name__RR	RRRR(((s8/usr/lib/python2.7/site-packages/salt/states/cryptdev.pyt<module>s^

Zerion Mini Shell 1.0