Sindbad~EG File Manager

Current Path : /lib/python3.6/site-packages/sos/report/plugins/__pycache__/
Upload File :
Current File : //lib/python3.6/site-packages/sos/report/plugins/__pycache__/autofs.cpython-36.pyc

3

�f�@sRddlmZmZmZmZGdd�de�ZGdd�dee�ZGdd�deee�ZdS)	�)�Plugin�RedHatPlugin�UbuntuPlugin�DebianPluginc@s@eZdZdZdZdZdZdZdd�Zd	d
�Z	dd�Z
d
d�ZdS)�AutofszAutofs on-demand automounter�autofs�storage�nfs�/etc/sysconfig/autofs�/etc/default/autofscCsB|jd|j��}x,|D]$}x|jd�D]}|dkr&dSq&WqWdS)	z; testing if autofs debug has been enabled anywhere
        �%^(DEFAULT_LOGGING|DAEMONOPTIONS)=(.*)� �--debug�debugTF)r)rr)�	file_grep�files�split)�self�optZopt1Zopt2�r�/usr/lib/python3.6/autofs.py�
checkdebugs

zAutofs.checkdebugcCs(|jd|j��}x|D]
}|dSWdS)z% capture daemon debug output
        �^(daemon.*)\s+(\/var\/log\/.*)�N)r)rr)rZdebugout�irrr�getdaemondebug$s



zAutofs.getdaemondebugcCsF|jd�|jddi�|jd�|jd�|j�rB|j|j��dS)Nz
/etc/auto*z/etc/autofs.confZautofs_confrzautomount -m)Z
add_copy_specZ
add_file_tagsZadd_service_status�add_cmd_outputrr)rrrr�setup-s


zAutofs.setupcCs.|jddd�|jddd�|jddd�dS)Nz
/etc/auto*z(password=)[^,\s]*z
\1********z/etc/autofs_ldap_auth.confz&(secret[\s]*[=]+[\s]*)(\'|\").*(\'|\")z\1\2********\3zautomount -m)Zdo_path_regex_subZdo_file_subZdo_cmd_output_sub)rrrr�postproc5szAutofs.postprocN)rr	)r
r)r)�__name__�
__module__�__qualname__Z
short_descZplugin_nameZprofilesrZpackagesrrrrrrrrrs	rcseZdZ�fdd�Z�ZS)�RedHatAutofscs"t�j�|jd�r|jd�dS)NZverifyzrpm -qV autofs)�superrZ
get_optionr)r)�	__class__rrrWs

zRedHatAutofs.setup)rr r!r�
__classcell__rr)r$rr"Usr"cseZdZ�fdd�Z�ZS)�DebianAutofscst�j�|jd�dS)Nzdpkg-query -s autofs)r#rr)r)r$rrr_s
zDebianAutofs.setup)rr r!rr%rr)r$rr&]sr&N)Zsos.report.pluginsrrrrrr"r&rrrr�<module>sG

Sindbad File Manager Version 1.0, Coded By Sindbad EG ~ The Terrorists