%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/extfs.pyc

�
���^c@@s�dZddlmZmZmZddlZddlZeje	�Z
d�Zd�Zd�Z
dd�Zdd�Zdd	�ZdS(
u+
Module for managing ext2/3/4 file systems
i(tabsolute_importtprint_functiontunicode_literalsNcC@s tjjj�rtdfStS(u)
    Only work on POSIX-like systems
    uSThe extfs execution module cannot be loaded: only available on non-Windows systems.(tsalttutilstplatformt
is_windowstFalsetTrue(((s6/usr/lib/python2.7/site-packages/salt/modules/extfs.pyt__virtual__scK@sidd6dd6dd6dd6d	d
6dd6d
d6dd6dd6dd6dd6dd6dd6dd6dd6dd 6d!d"6d#d$6d%d&6d'd(6d)d*6d+d,6d-d.6d/d06}d1}xg|D]_}||kr�||}||d2kr�|d3j|�7}q|d4j|||�7}q�q�Wd5j|||�}td6|d7t�j�}g}	x�|D]�}
|
snq\n~|
jd8�r�q\ni|
jd9�r�q\nT|
jd:�r�q\n?|
jd;�r�q\n*|
jd<�r�q\n|
jd=�r�q\n|	j|
�q\W|	S(>u�
    Create a file system on the specified device

    CLI Example:

    .. code-block:: bash

        salt '*' extfs.mkfs /dev/sda1 fs_type=ext4 opts='acl,noexec'

    Valid options are:

    * **block_size**: 1024, 2048 or 4096
    * **check**: check for bad blocks
    * **direct**: use direct IO
    * **ext_opts**: extended file system options (comma-separated)
    * **fragment_size**: size of fragments
    * **force**: setting force to True will cause mke2fs to specify the -F
      option twice (it is already set once); this is truly dangerous
    * **blocks_per_group**: number of blocks in a block group
    * **number_of_groups**: ext4 option for a virtual block group
    * **bytes_per_inode**: set the bytes/inode ratio
    * **inode_size**: size of the inode
    * **journal**: set to True to create a journal (default on ext3/4)
    * **journal_opts**: options for the fs journal (comma separated)
    * **blocks_file**: read bad blocks from file
    * **label**: label to apply to the file system
    * **reserved**: percentage of blocks reserved for super-user
    * **last_dir**: last mounted directory
    * **test**: set to True to not actually create the file system (mke2fs -n)
    * **number_of_inodes**: override default number of inodes
    * **creator_os**: override "creator operating system" field
    * **opts**: mount options (comma separated)
    * **revision**: set the filesystem revision (default 1)
    * **super**: write superblock and group descriptors only
    * **fs_type**: set the filesystem type (REQUIRED)
    * **usage_type**: how the filesystem is going to be used
    * **uuid**: set the UUID for the file system

    See the ``mke2fs(8)`` manpage for a more complete description of these
    options.
    ubu
block_sizeucucheckuDudirectuEuext_optsufu
fragment_sizeuFuforceugublocks_per_groupuGunumber_of_groupsuiubytes_per_inodeuIu
inode_sizeujujournaluJujournal_optsulublocks_fileuLulabelumureserveduMulast_dirunutestuNunumber_of_inodesuou
creator_osuOuoptsururevisionuSusuperuTu
usage_typeuUuuuiduuTrueu-{0} u	-{0} {1} umke2fs -F -t {0} {1}{2}ucmd.runtpython_shellumke2fsuDiscarding device blocksuAllocating group tablesuWriting inode tablesuCreating journaluWriting superblocks(tformatt__salt__Rt
splitlinest
startswithtappend(tdevicetfs_typetkwargst	kwarg_maptoptstkeytopttcmdtouttrettline((s6/usr/lib/python2.7/site-packages/salt/modules/extfs.pytmkfssf*



!
cK@s-idd6dd6dd6dd6d	d
6dd6d
d6dd6dd6dd6dd6dd6dd6dd6dd6dd 6d!d"6d#d$6d%d&6}d'}xg|D]_}||kr�||}||d(kr�|d)j|�7}q�|d*j|||�7}q�q�Wd+j||�}td,|d-t�j�}|S(.u+
    Set attributes for the specified device (using tune2fs)

    CLI Example:

    .. code-block:: bash

        salt '*' extfs.tune /dev/sda1 force=True label=wildstallyns opts='acl,noexec'

    Valid options are:

    * **max**: max mount count
    * **count**: mount count
    * **error**: error behavior
    * **extended_opts**: extended options (comma separated)
    * **force**: force, even if there are errors (set to True)
    * **group**: group name or gid that can use the reserved blocks
    * **interval**: interval between checks
    * **journal**: set to True to create a journal (default on ext3/4)
    * **journal_opts**: options for the fs journal (comma separated)
    * **label**: label to apply to the file system
    * **reserved**: percentage of blocks reserved for super-user
    * **last_dir**: last mounted directory
    * **opts**: mount options (comma separated)
    * **feature**: set or clear a feature (comma separated)
    * **mmp_check**: mmp check interval
    * **reserved**: reserved blocks count
    * **quota_opts**: quota options (comma separated)
    * **time**: time last checked
    * **user**: user or uid who can use the reserved blocks
    * **uuid**: set the UUID for the file system

    See the ``mke2fs(8)`` manpage for a more complete description of these
    options.
    ucumaxuCucountueuerroruEu
extended_optsufuforceugugroupuiuintervalujujournaluJujournal_optsuLulabeluMulast_diruouoptsuOufeatureupu	mmp_checkurureserveduQu
quota_optsuTutimeuuuuseruUuuuiduuTrueu-{0} u	-{0} {1} utune2fs {0}{1}ucmd.runR
(RRRR
(RRRRRRRR((s6/usr/lib/python2.7/site-packages/salt/modules/extfs.pyttune~s:$



!cC@st||�}|dS(u�
    Return attributes from dumpe2fs for a specified device

    CLI Example:

    .. code-block:: bash

        salt '*' extfs.attributes /dev/sda1
    u
attributes(tdump(Rtargstfsdump((s6/usr/lib/python2.7/site-packages/salt/modules/extfs.pyt
attributes�s
cC@st||�}|dS(u�
    Return block and inode info from dumpe2fs for a specified device

    CLI Example:

    .. code-block:: bash

        salt '*' extfs.blocks /dev/sda1
    ublocks(R(RRR((s6/usr/lib/python2.7/site-packages/salt/modules/extfs.pytblocks�s
cC@s�dj|�}|r&|d|}niid6id6}td|dt�j�}d}d"}x||D]t}|s{qin|jd�r�qin|dkrJ|jd	d
�}|jd�}|jd�r�|d
j�|d|d<qJ|jd�r|jd�rd}qJt|�dkr+qin|d
j	�|d|d<n|dkri|jd�r/|jdd�}|jdd�}|jdd�}|jdd�}|jdd�}|j�}|d
}	dj|	�}i|d|<|	|d|d<|d|d|d<g|d|d<q�d|krr|jd�}|d
jd�}
|
|d|d<q�d |kr�|jd�}|d
jd�}||d|d!<q�|j	�}|d|dj
|�qiqiW|S(#u�
    Return all contents of dumpe2fs for a specified device

    CLI Example:

    .. code-block:: bash

        salt '*' extfs.dump /dev/sda1
    udumpe2fs {0}u -u
attributesublocksucmd.runR
uoptsudumpe2fsu	u u: uFilesystem featuresiiuGroupuGroup descriptor sizeiu:uu(u)u[u]u	Group {0}ugroupiurangeuextrauFree blocks:u, ufree blocksuFree inodes:ufree inodesN(RRRR
tNoneRtreplacetsplittlentstripR(RRRRRtmodetgroupRtcompstblkgrptfree_blockstinodes((s6/usr/lib/python2.7/site-packages/salt/modules/extfs.pyR�s^

	
 (t__doc__t
__future__RRRtloggingtsalt.utils.platformRt	getLoggert__name__tlogR	RRR"R R!R(((s6/usr/lib/python2.7/site-packages/salt/modules/extfs.pyt<module>s	
	a	D

Zerion Mini Shell 1.0