Current File : //lib/python2.7/site-packages/sos/policies/suse.pyo
�
u��ec@s�ddlmZddlZddlZddlmZmZddlmZm	Z	ddl
mZdefd��YZ
de
fd	��YZdS(
i����(tprint_functionN(tRedHatPlugint
SuSEPlugin(tLinuxPolicytPackageManager(t_sost
SuSEPolicycBsVeZdZdZdZdZdd�Zed��Z	d�Z
d�Zd�ZRS(	tSuSEshttps://www.suse.com/s/var/tmpcCs�tt|�j�d|_td�|_ttg|_|jj	�}|srt
ddtj�tj
d�nd|_|jtjd7_|jtjd7_|j�dS(	Nts,rpm -qa --queryformat "%{NAME}|%{VERSION}\n"s'Could not obtain installed package listtfileis/usr/sbin:/usr/bin:/root/bins/usr/local/bins/usr/local/sbin(tsuperRt__init__t
ticket_numberRtpackage_managerRRtvalid_subclassestall_pkgstprinttsyststderrtexittPATHtostpathsept
set_exec_path(tselftsysroottpkgs((s5/usr/lib/python2.7/site-packages/sos/policies/suse.pyRs		cCstS(s�This method checks to see if we are running on SuSE. It must be
        overriden by concrete subclasses to return True when running on an
        OpenSuSE, SLES or other Suse distribution and False otherwise.(tFalse(tcls((s5/usr/lib/python2.7/site-packages/sos/policies/suse.pytcheck-scCs�ddlm}m}g}|d|dtd|d|dddt�}|j�\}}|rf|Sxj|j�d	D]X}y|jd
d	�\}	}
Wntk
r�qwX|
dkrw|jt|	��qwqwW|S(Ni����(tPopentPIPEs"LC_ALL=C /sbin/chkconfig --list %stshelltstdoutRtbufsizet	close_fdsit:ton(	t
subprocessRRtTruetcommunicatetsplitt
IndexErrortappendtint(RtnameRRtrettptoutterrttabstrunleveltonoff((s5/usr/lib/python2.7/site-packages/sos/policies/suse.pytrunlevel_by_service4s&
	
cCs|s
|jS|S(N(t_tmp_dir(Rtopt_tmp_dir((s5/usr/lib/python2.7/site-packages/sos/policies/suse.pytget_tmp_dirJscCs
|j�S(N(t	host_name(R((s5/usr/lib/python2.7/site-packages/sos/policies/suse.pytget_local_nameOsN(
t__name__t
__module__tdistrotvendort
vendor_urlR6tNoneRtclassmethodRR5R8R:(((s5/usr/lib/python2.7/site-packages/sos/policies/suse.pyRs		tOpenSuSEPolicycBsAeZdZdZdZed�Zdd�Ze	d��Z
RS(tOpenSuSERshttps://www.opensuse.org/sJThis command will collect diagnostic and configuration information from this %(distro)s system and installed applications.

An archive containing the collected information will be generated in %(tmpdir)s and may be provided to a %(vendor)s support representative.

No changes will be made to system configuration.
%(vendor_text)s
cCstt|�jd|�dS(NR(R
RBR(RR((s5/usr/lib/python2.7/site-packages/sos/policies/suse.pyRdscCstjjd�S(s=This method checks to see if we are running on SuSE.
        s/etc/SuSE-release(Rtpathtisfile(R((s5/usr/lib/python2.7/site-packages/sos/policies/suse.pyRgsN(R;R<R=R>R?t_tmsgR@RRAR(((s5/usr/lib/python2.7/site-packages/sos/policies/suse.pyRBSs	(t
__future__RRRtsos.pluginsRRtsos.policiesRRtsosRRFRRB(((s5/usr/lib/python2.7/site-packages/sos/policies/suse.pyt<module>s?