File manager - Edit - /opt/saltstack/salt/lib/python3.10/site-packages/salt/modules/__pycache__/rebootmgr.cpython-310.pyc
Back
o ;j� � @ s� d Z ddlZddlZddlZe�e�Zdd� Zd$dd�Z dd � Z d d� Zd%dd �Zdd� Z dd� Zd%dd�Zdd� Zdd� Zdd� Zdd� Zdd� Zd%dd�Zd&d d!�Zd&d"d#�ZdS )'z� Module for rebootmgr :maintainer: Alberto Planas <aplanas@suse.com> :maturity: new :depends: None :platform: Linux .. versionadded:: 3004 � Nc C s t d d�dur dS dS )z!rebootmgrctl command is required.z path.which�rebootmgrctlNT)Fz2Module rebootmgt requires the command rebootmgrctl)Z __utils__� r r �J/opt/saltstack/salt/lib/python3.10/site-packages/salt/modules/rebootmgr.py�__virtual__ s r Fc C s8 t d | �}|r|d S |d rtj�|d ��|d S )z!Utility function to run commands.zcmd.run_all�retcode�stderr�stdout)Z__salt__�salt� exceptions�CommandExecutionError)�cmdr �resultr r r �_cmd s r c C s ddg} t | ��� d S )zzReturn the version of rebootmgrd CLI Example: .. code-block:: bash salt microos rebootmgr version r z --version���)r �split�r r r r �version'