← Back
Editing: __init__.cpython-312.pyc
� ܓ�io � �, � d dl Z d dlmZ G d� d� Zy)� N)�sos_get_command_outputc �T � e Zd ZdZ d d�Zd� Zd� Zd� Zdd�Zd� Z d � Z d � Zd� Zd� Z y)� InitSystema� Encapsulates an init system to provide service-oriented functions to sos. This should be used to query the status of services, such as if they are enabled or disabled on boot, or if the service is currently running. :param init_cmd: The binary used to interact with the init system :type init_cmd: ``str`` :param list_cmd: The list subcmd given to `init_cmd` to list services :type list_cmd: ``str`` :param query_cmd: The query subcmd given to `query_cmd` to query the status of services :type query_cmd: ``str`` :param chroot: Location to chroot to for any command execution, i.e. the sysroot if we're running in a container :type chroot: ``str`` or ``None`` Nc � � i | _ || _ | j � d|� �xs d| _ | j � d|� �xs d| _ || _ y)zInitialize a new InitSystem()� N)�services�init_cmd�list_cmd� query_cmd�chroot)�selfr r r r s �G/usr/lib/python3.12/site-packages/sos/policies/init_systems/__init__.py�__init__zInitSystem.__init__&