| Current File : //opt/cloudlinux/venv/lib/python3.11/site-packages/clcommon/__pycache__/sysctl.cpython-311.pyc |
�
^Se� � � � d dl mZ d dl mZ d dl mZ d dlZd dlmZ d dlmZm Z m
Z
d dlmZm
Z
dZd Z G d
� d� � Z G d� d
� � ZdS )� )�absolute_import)�division)�print_functionN)�ConfigParser)�run_command�get_file_lines�ExternalProgramFailed)�AnyStr�Listz /etc/sysctl.d/90-cloudlinux.confz/etc/sysctl.confc �z � e Zd ZdZdZedfd�Zd� Zed� � � Z d� Z
ed� � � Zd � Z
d
� Zd� Zdd�Zd
� ZdS )�
SysCtlConfz(
For reading params from sysctl
z/sbin/sysctlTc �` � || _ d� | j � � | _ || _ dS )z�
:param config_file: path to user defined systcl config file
:param mute_errors: T/F value to define should we skip errors or not (used in cldiag checker)
�{}.tmpN)�config_file�format�config_tmp_file�mute_errors)�selfr r s ��/builddir/build/BUILDROOT/alt-python27-cllib-3.3.8-1.el8.cloudlinux.x86_64/opt/cloudlinux/venv/lib/python3.11/site-packages/clcommon/sysctl.py�__init__zSysCtlConf.__init__ s1 � � '���'���t�/?�@�@���&����� c �j � | j dg} t |� � dS # t $ r | j s� Y dS w xY w)z>
Apply all params from sysctl.d & sysctl.conf
z--systemN)�
SYSCTL_BINr r r )r �cmds r �
_apply_allzSysCtlConf._apply_all'