%PDF- %PDF-
Mini Shell

Mini Shell

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

�
���^c@@stdZddlmZmZmZddlZeje�Zd�Z	d�Z
dd�Zdd�Z
d�ZdS(	u�
Manage kernel packages and active kernel version
=========================================================================

Example state to install the latest kernel from package repositories:

.. code-block:: yaml

    install-latest-kernel:
      kernel.latest_installed: []

Example state to boot the system if a new kernel has been installed:

.. code-block:: yaml

    boot-latest-kernel:
      kernel.latest_active:
        - at_time: 1

Example state chaining the install and reboot operations:

.. code-block:: yaml

    install-latest-kernel:
      kernel.latest_installed: []

    boot-latest-kernel:
      kernel.latest_active:
        - at_time: 1
        - onchanges:
          - kernel: install-latest-kernel

Chaining can also be achieved using wait/listen requisites:

.. code-block:: yaml

    install-latest-kernel:
      kernel.latest_installed: []

    boot-latest-kernel:
      kernel.latest_wait:
        - at_time: 1
        - listen:
          - kernel: install-latest-kernel
i(tabsolute_importtprint_functiontunicode_literalsNcC@s
dtkS(ut
    Only make these states available if a kernelpkg provider has been detected or
    assigned for this minion
    ukernelpkg.upgrade(t__salt__(((s9/usr/lib/python2.7/site-packages/salt/states/kernelpkg.pyt__virtual__5scK@s�td�}td�}i|d6}||kr]t|d<dj|�|d<i|d<nctdr�d
|d<i|d<d	j|�|d<n/td
�}t|d<|d|d<d|d<|S(u8
    Ensure that the latest version of the kernel available in the
    repositories is installed.

    .. note::

        This state only installs the kernel, but does not activate it.
        The new kernel should become active at the next reboot.
        See :py:func:`kernelpkg.needs_reboot <salt.modules.kernelpkg_linux_yum.needs_reboot>` for details on
        how to detect this condition, and :py:func:`~salt.states.kernelpkg.latest_active`
        to initiale a reboot when needed.

    name
        Arbitrary name for the state. Does not affect behavior.
    ukernelpkg.list_installedukernelpkg.latest_availableunameuresultu3The latest kernel package is already installed: {0}ucommentuchangesutestu0The latest kernel package will be installed: {0}ukernelpkg.upgradeuupgradesu@The latest kernel package has been installed, but not activated.N(RtTruetformatt__opts__tNone(tnametkwargst	installedtupgradetrettresult((s9/usr/lib/python2.7/site-packages/salt/states/kernelpkg.pytlatest_installed=s$











cK@s�td�}td�}i|d6}td�r�dj|�|d<tdr}d|d<ii|d	6|d
6d6|d<q�td
d|�t|d<ii|d	6|d
6d6|d<n't|d<dj|�|d<i|d<|S(u
    Initiate a reboot if the running kernel is not the latest one installed.

    .. note::

        This state does not install any patches. It only compares the running
        kernel version number to other kernel versions also installed in the
        system. If the running version is not the latest one installed, this
        state will reboot the system.

        See :py:func:`kernelpkg.upgrade <salt.modules.kernelpkg_linux_yum.upgrade>` and
        :py:func:`~salt.states.kernelpkg.latest_installed`
        for ways to install new kernel packages.

        This module does not attempt to understand or manage boot loader configurations
        it is possible to have a new kernel installed, but a boot loader configuration
        that will never activate it. For this reason, it would not be advisable to
        schedule this state to run automatically.

        Because this state function may cause the system to reboot, it may be preferable
        to move it to the very end of the state run.
        See :py:func:`~salt.states.kernelpkg.latest_wait`
        for a waitable state that can be called with the `listen` requesite.

    name
        Arbitrary name for the state. Does not affect behavior.

    at_time
        The wait time in minutes before the system will be rebooted.
    ukernelpkg.activeukernelpkg.latest_installedunameukernelpkg.needs_rebootu1The system will be booted to activate kernel: {0}ucommentutesturesultuoldunewukerneluchangesu
system.reboottat_timeu2The latest installed kernel package is active: {0}N(RRRRR(R	RR
tactivetlatestR
((s9/usr/lib/python2.7/site-packages/salt/states/kernelpkg.pyt
latest_activeis*










cK@s i|d6id6td6dd6S(u}
    Initiate a reboot if the running kernel is not the latest one installed. This is the
    waitable version of :py:func:`~salt.states.kernelpkg.latest_active` and
    will not take any action unless triggered by a watch or listen requesite.

    .. note::

        Because this state function may cause the system to reboot, it may be preferable
        to move it to the very end of the state run using `listen` or `listen_in` requisites.

        .. code-block:: yaml

            system-up-to-date:
              pkg.uptodate:
                - refresh: true

            boot-latest-kernel:
              kernelpkg.latest_wait:
                - at_time: 1
                - listen:
                  - pkg: system-up-to-date

    name
        Arbitrary name for the state. Does not affect behavior.

    at_time
        The wait time in minutes before the system will be rebooted.
    unameuchangesuresultuucomment(R(R	RR
((s9/usr/lib/python2.7/site-packages/salt/states/kernelpkg.pytlatest_wait�s
cK@sF|d	krt||�Si|d6id6dj|�d6td6SdS(
uC
    Execute a kernelpkg state based on a watch or listen call
    u
latest_activeulatest_waitunameuchangesu5kernelpkg.{0} does not work with the watch requisite.ucommenturesultN(u
latest_activeulatest_wait(RRtFalse(R	tsfunR
((s9/usr/lib/python2.7/site-packages/salt/states/kernelpkg.pyt	mod_watch�s

(t__doc__t
__future__RRRtloggingt	getLoggert__name__tlogRRRRRR(((s9/usr/lib/python2.7/site-packages/salt/states/kernelpkg.pyt<module>.s		,@#

Zerion Mini Shell 1.0