ok
Direktori : /opt/alt/python37/lib/python3.7/site-packages/clcommon/__pycache__/ |
Current File : //opt/alt/python37/lib/python3.7/site-packages/clcommon/__pycache__/sysctl.cpython-37.pyc |
B E!wd� � @ s� d dl mZ d dl mZ d dl mZ d dlZd dlmZ d dlmZm Z m Z d dlmZm Z dZd ZG d d� d�ZG dd � 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 @ st e Zd ZdZdZedfdd�Zdd� Zedd � �Z d d� Z edd � �Zdd� Z dd� Zdd� Zddd�Zdd� ZdS )� SysCtlConfz( For reading params from sysctl z/sbin/sysctlTc C s || _ 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) z{}.tmpN)�config_file�format�config_tmp_file�mute_errors)�selfr r � r �@/opt/alt/python37/lib/python3.7/site-packages/clcommon/sysctl.py�__init__ s zSysCtlConf.__init__c C s8 | j dg}yt|� W n tk r2 | js.� Y nX dS )z> Apply all params from sysctl.d & sysctl.conf z--systemN)� SYSCTL_BINr r r )r �cmdr r r � _apply_all'