404

[ Avaa Bypassed ]




Upload:

Command:

elspacio@18.191.234.200: ~ $
3

\�meh'�@sxddlZddlZddlmZmZmZmZddlmZddlm	Z
ddlmZddl
mZeje�ZGdd�dej�ZdS)	�N)�distros�helpers�subp�util)�PackageList)�	rhel_util)�HostnameConf)�PER_INSTANCEc@s�eZdZdZdZdgZdZdZdZdZ	dZ
d	Zd
Zddd
ddddd�d�iZ
dd�Zd/dd�Zed�dd�Zd0dd�Zdd�Zdd �Zd1d!d"�Zd#d$�Zd%d&�Zd'd(�Zd)d*�Zd+d,�Zed-d.��ZdS)2�Distroz/etc/sysconfig/clockz
/etc/HOSTNAMEZservicez/etc/sysconfig/languagez/etc/sysconfig/network/configz/etc/sysconfig/network/ifcfg-%sz!/etc/sysconfig/network/ifroute-%sz
/etc/hostnamez/etc/locale.confz/etc/localtime�	sysconfigzetc/sysconfig/network/config�susez%(base)s/network/ifcfg-%(name)sz3etc/udev/rules.d/85-persistent-net-cloud-init.rulesz!%(base)s/network/ifroute-%(name)s)Zipv4Zipv6)ZcontrolZflavorZiface_templatesZ
netrules_pathZroute_templatescCsTtjj||||�tj|�|_d|_d|_d|_d|d<|j	�rPdg|_
d|d<dS)NrFZsshdZssh_svcnameZ	systemctlzsshd.service)rr
�__init__rZRunners�_runnerZosfamily�
update_method�read_only_root�uses_systemd�init_cmd)�self�nameZcfg�paths�r�/usr/lib/python3.6/opensuse.pyr
1szDistro.__init__NcCs>|j�r|s|j}d|i}n|s&|j}d|i}tj||�dS)NZLANGZRC_LANG)r�systemd_locale_conf_fn�locale_conf_fn�rhutil�update_sysconfig_file)rZlocaleZout_fnZ
locale_cfgrrr�apply_locale<s
zDistro.apply_locale)�pkglistcCs|jdd|d�dS)NZinstallz--auto-agree-with-licenses)�args�pkgs)�package_command)rrrrr�install_packagesGszDistro.install_packagescCs|dkrg}|j�|jr4|jdkr4tjd�dS|jdkrHddg}nddddg}|dkr`d	}|r�|jdkr�|d	kr�d
}dddg}|dkr�ddg}|j|�|r�t|t�r�|j|�n|r�t|t�r�|j	|�t
jd|�}|j	|�tj|d
d�|jdk�rtj
d�dS)N�
transactionalzUPackage operation requested but read only root without btrfs and transactional-updata�zypperz--non-interactiveztransactional-updatez--drop-if-no-changeZpkgZupgrade�updateZup�refreshz%s-%sF)Zcapturez8To use/activate the installed packages reboot the system)�_set_update_methodrr�LOG�error�append�
isinstance�str�list�extendrZexpand_package_listr�info)rZcommandrr�cmdrrrrr LsF





zDistro.package_commandcCsZ|j|�}|j�r.tj|j�tj||j�n(dt|�i}tj|j	|�tj
||j�dS)NZTIMEZONE)Z
_find_tz_filerrZdel_file�tz_local_fnZsym_linkr+rr�
clock_conf_fn�copy)rZtzZtz_fileZ	clock_cfgrrr�set_timezone�s
zDistro.set_timezonecCs|jjd|jdgtd�dS)Nzupdate-sourcesr%)Zfreq)rZrunr r	)rrrr�update_package_sources�s
zDistro.update_package_sourcescCs�|j�r |jd�r tj|�j�S|j�rJtjdg�\}}t|�rD|S|Sn6y|j|�}|j}Wnt	k
rrYnX|s||S|SdS)Nz/previous-hostname�hostname)
r�endswithr�	load_file�stripr�len�_read_hostname_confr5�IOError)r�filename�default�outZ_err�confr5rrr�_read_hostname�s

zDistro._read_hostnamecCsdS)Nz	127.0.1.1r)rrrr�_get_localhost_ip�szDistro._get_localhost_ipcCsttj|��}|j�|S)N)rrr7�parse)rr<r?rrrr:�szDistro._read_hostname_confcCs$|j�r|j}n|j}||j|�fS)N)r�systemd_hostname_conf_fn�hostname_conf_fnr@)rZhost_fnrrr�_read_system_hostname�szDistro._read_system_hostnamecCs�|jdkr�tjd�}d}|r�|\}}}tjd�jd�}x>|D]6}|j|�r<|j�}|d|kr`q<|djd�|_Pq<W|j�d	kr�tj	j
d
�r�d|_q�d|_ntjd
�d|_dS)z7Decide if we want to use transactional-update or zypperN�/�z/proc/mounts�
��ZroZbtrfsz/usr/sbin/transactional-updater"r#z7Could not determine filesystem type of '/' using zypper)
rrZget_mount_infor7�split�
startswithr�lower�os�path�existsr'r.)r�resultZfs_typeZdevpthZmount_pointZmountsZmountZ
mount_inforrrr&�s(




zDistro._set_update_methodcCs�tj|jdd�}|j�r0|jd�r0tj||�n�|j�rj|rRtjddt|�g�q�tjdddt|�g�nZd}y|j|�}Wnt	k
r�|r�ndSYnX|s�t
d�}|j|�tj|t|�d�dS)	N�create_hostname_fileTz/previous-hostnameZhostnamectlzset-hostnamez--transientrGi�)rZget_cfg_option_boolZ_cfgrr6Z
write_filerr+r:r;rZset_hostname)rr5r<rRr?rrr�_write_hostname�s.

zDistro._write_hostnamecCsx|jsrtj�d}|d}t|djd�d�}|dkr@d|ksX|dkrfd|krf|dkrfdd	d
g|_nd
d	dg|_|jS)z5The preferred ntp client is dependent on the version.ZdistrrI�.�ZopenSUSE�*Zchronyzsystemd-timesyncdZntp)Z_preferred_ntp_clientsrZsystem_info�intrK)rZdistro_inforZ	major_verrrr�preferred_ntp_clientss
zDistro.preferred_ntp_clients)N)NN)N)�__name__�
__module__�__qualname__r1rDrrZnetwork_conf_fnZnetwork_script_tplZroute_conf_tplrCrr0Zrenderer_configsr
rrr!r r3r4r@rAr:rEr&rS�propertyrXrrrrr
s<

=
"r
)ZloggingrNZ	cloudinitrrrrZcloudinit.distrosrrrZ"cloudinit.distros.parsers.hostnamerZcloudinit.settingsr	Z	getLoggerrYr'r
rrrr�<module>s


Filemanager

Name Type Size Permission Actions
OpenCloudOS.cpython-36.opt-1.pyc File 542 B 0644
OpenCloudOS.cpython-36.pyc File 542 B 0644
TencentOS.cpython-36.opt-1.pyc File 540 B 0644
TencentOS.cpython-36.pyc File 540 B 0644
__init__.cpython-36.opt-1.pyc File 35.6 KB 0644
__init__.cpython-36.pyc File 35.6 KB 0644
almalinux.cpython-36.opt-1.pyc File 313 B 0644
almalinux.cpython-36.pyc File 313 B 0644
alpine.cpython-36.opt-1.pyc File 6.78 KB 0644
alpine.cpython-36.pyc File 6.78 KB 0644
amazon.cpython-36.opt-1.pyc File 450 B 0644
amazon.cpython-36.pyc File 450 B 0644
arch.cpython-36.opt-1.pyc File 7.33 KB 0644
arch.cpython-36.pyc File 7.33 KB 0644
bsd.cpython-36.opt-1.pyc File 4.87 KB 0644
bsd.cpython-36.pyc File 4.87 KB 0644
bsd_utils.cpython-36.opt-1.pyc File 1.09 KB 0644
bsd_utils.cpython-36.pyc File 1.09 KB 0644
centos.cpython-36.opt-1.pyc File 310 B 0644
centos.cpython-36.pyc File 310 B 0644
cloudlinux.cpython-36.opt-1.pyc File 314 B 0644
cloudlinux.cpython-36.pyc File 314 B 0644
cos.cpython-36.opt-1.pyc File 309 B 0644
cos.cpython-36.pyc File 309 B 0644
debian.cpython-36.opt-1.pyc File 7.52 KB 0644
debian.cpython-36.pyc File 7.52 KB 0644
dragonflybsd.cpython-36.opt-1.pyc File 361 B 0644
dragonflybsd.cpython-36.pyc File 361 B 0644
eurolinux.cpython-36.opt-1.pyc File 313 B 0644
eurolinux.cpython-36.pyc File 313 B 0644
fedora.cpython-36.opt-1.pyc File 310 B 0644
fedora.cpython-36.pyc File 310 B 0644
freebsd.cpython-36.opt-1.pyc File 6.21 KB 0644
freebsd.cpython-36.pyc File 6.21 KB 0644
gentoo.cpython-36.opt-1.pyc File 6.91 KB 0644
gentoo.cpython-36.pyc File 6.91 KB 0644
mariner.cpython-36.opt-1.pyc File 1.54 KB 0644
mariner.cpython-36.pyc File 1.54 KB 0644
miraclelinux.cpython-36.opt-1.pyc File 316 B 0644
miraclelinux.cpython-36.pyc File 316 B 0644
net_util.cpython-36.opt-1.pyc File 1.84 KB 0644
net_util.cpython-36.pyc File 1.84 KB 0644
netbsd.cpython-36.opt-1.pyc File 4.58 KB 0644
netbsd.cpython-36.pyc File 4.58 KB 0644
networking.cpython-36.opt-1.pyc File 12.21 KB 0644
networking.cpython-36.pyc File 12.21 KB 0644
openbsd.cpython-36.opt-1.pyc File 2.26 KB 0644
openbsd.cpython-36.pyc File 2.26 KB 0644
openeuler.cpython-36.opt-1.pyc File 538 B 0644
openeuler.cpython-36.pyc File 538 B 0644
openmandriva.cpython-36.opt-1.pyc File 318 B 0644
openmandriva.cpython-36.pyc File 318 B 0644
opensuse-leap.cpython-36.opt-1.pyc File 321 B 0644
opensuse-leap.cpython-36.pyc File 321 B 0644
opensuse-microos.cpython-36.opt-1.pyc File 324 B 0644
opensuse-microos.cpython-36.pyc File 324 B 0644
opensuse-tumbleweed.cpython-36.opt-1.pyc File 327 B 0644
opensuse-tumbleweed.cpython-36.pyc File 327 B 0644
opensuse.cpython-36.opt-1.pyc File 6.28 KB 0644
opensuse.cpython-36.pyc File 6.28 KB 0644
photon.cpython-36.opt-1.pyc File 4.31 KB 0644
photon.cpython-36.pyc File 4.31 KB 0644
rhel.cpython-36.opt-1.pyc File 4.82 KB 0644
rhel.cpython-36.pyc File 4.82 KB 0644
rhel_util.cpython-36.opt-1.pyc File 969 B 0644
rhel_util.cpython-36.pyc File 969 B 0644
rocky.cpython-36.opt-1.pyc File 309 B 0644
rocky.cpython-36.pyc File 309 B 0644
sle-micro.cpython-36.opt-1.pyc File 317 B 0644
sle-micro.cpython-36.pyc File 317 B 0644
sle_hpc.cpython-36.opt-1.pyc File 315 B 0644
sle_hpc.cpython-36.pyc File 315 B 0644
sles.cpython-36.opt-1.pyc File 312 B 0644
sles.cpython-36.pyc File 312 B 0644
suse.cpython-36.opt-1.pyc File 312 B 0644
suse.cpython-36.pyc File 312 B 0644
ubuntu.cpython-36.opt-1.pyc File 1.45 KB 0644
ubuntu.cpython-36.pyc File 1.45 KB 0644
ug_util.cpython-36.opt-1.pyc File 3.91 KB 0644
ug_util.cpython-36.pyc File 3.91 KB 0644
virtuozzo.cpython-36.opt-1.pyc File 313 B 0644
virtuozzo.cpython-36.pyc File 313 B 0644