404

[ Avaa Bypassed ]




Upload:

Command:

elspacio@3.137.216.77: ~ $
3

\�meT�@s�ddlZddlZddlmZmZddljjjZddl	m
Z
mZmZmZm
Z
ddlmZmZddlmZeje�ZGdd�de
j�ZdS)�N)�List�Optional)�distros�helpers�net�subp�util)�PackageList�	bsd_utils)�
BSDNetworkingcs�eZdZUeZdZdZdZdddd�ZgZ	e
e	gZe
egZ
e
e
dZee
edZee
eejZ�fdd	�Zd
d�Zd$dd
�Zdd�Zdd�Zd%dd�Zdd�Zed�dd�Zdd�Zd&dd�Zdd�Zd'dd �Z e!e"d!�d"d#�Z#�Z$S)(�BSDz/etc/rc.confz
root:wheelz-Hz-pz-r)ZhaltZpoweroffZrebootNcsFt�j|||�tj|�|_d|d<d|d<tj�j�|_t	j
|_dS)NZsshdZssh_svcnameZrsyslogdZrsyslog_svcname)�super�__init__rZRunnersZ_runner�platform�system�lowerZosfamily�
bsd_netops�	BsdNetOps�net_ops)�self�nameZcfg�paths)�	__class__��/usr/lib/python3.6/bsd.pyr szBSD.__init__cCs|j|j�}|j|fS)N)�_read_hostname�hostname_conf_fn)rZsys_hostnamerrr�_read_system_hostname+szBSD._read_system_hostnamecCs
tjd�S)N�hostname)r
Zget_rc_config_value)r�filename�defaultrrrr/szBSD._read_hostnamecCstd��dS)Nz&Return list cmd to add member to group)�NotImplementedError)r�member_nameZ
group_namerrr�_get_add_member_to_group_cmd2sz BSD._get_add_member_to_group_cmdcCstjd|dd�dS)Nrz/etc/rc.conf)�fn)r
Zset_rc_config_value)rrrrrr�_write_hostname5szBSD._write_hostnamecCs�tj|�rtjd|�nJ|j|g}ytj|�tjd|�Wn"tk
r`tjtd|�YnX|sjg}xp|D]h}tj	|�s�tjd||�qpy$tj|j
||��tjd||�Wqptk
r�tjtd||�YqpXqpWdS)Nz(Skipping creation of existing group '%s'zCreated new group %szFailed to create group %szCUnable to add group member '%s' to group '%s'; user does not exist.zAdded user '%s' to group '%s'z%Failed to add user '%s' to group '%s')rZis_group�LOGZwarning�group_add_cmd_prefixr�info�	ExceptionZlogexcZis_userr#)rr�membersZ
group_add_cmd�memberrrr�create_group8s.



zBSD.create_groupcCsFgdd�}x6tj�j�D]&\}}|djd||ddigd��qW|S)N�)�config�versionr.Zphysical�typeZdhcp)r0rZmac_addressZsubnets)rZget_interfaces_by_mac�items�append)rZnconfZmacrrrr�generate_fallback_configVs
zBSD.generate_fallback_config)�pkglistcCs|j�|jd|d�dS)N�install)�pkgs)Zupdate_package_sources�package_command)rr4rrr�install_packagescszBSD.install_packagescCstd��dS)z?Return environment vars used in *BSD package_command operationsz(BSD subclasses return a dict of env varsN)r!)rrrr�_get_pkg_cmd_environgszBSD._get_pkg_cmd_environcCs�|dkrg}|dkr|j}nB|dkr,|j}n2|dkrF|js>dS|j}n|dkr^|jsXdS|j}|rxt|t�rx|j|�n|r�t|t�r�|j|�t	j
d|�}|j|�tj||j�dd�dS)Nr5�remove�updateZupgradez%s-%sF)�envZcapture)
�pkg_cmd_install_prefix�pkg_cmd_remove_prefix�pkg_cmd_update_prefix�pkg_cmd_upgrade_prefix�
isinstance�strr2�list�extendrZexpand_package_listrr9)rZcommand�argsr6�cmdr4rrrr7ks*

zBSD.package_commandcCstj||j|�d�dS)N)�tzZtz_file)rZset_etc_timezoneZ
_find_tz_file)rrGrrr�set_timezone�szBSD.set_timezonecCstjd�dS)NzCannot set the locale.)r&�debug)rZlocaleZout_fnrrr�apply_locale�szBSD.apply_locale)�plist_in�hashedcCs&x |D]\}}|j|||d�qWdS)N)rL)Z
set_passwd)rrKrLrZpasswordrrr�chpasswd�szBSD.chpasswd)N)N)NN)N)%�__name__�
__module__�__qualname__rZnetworking_clsrZ
rc_conf_fnZ
default_ownerZshutdown_options_mapr'rrBr=r>r?rr@rrrrrrr#r%r,r3r	r8r9r7rHrJrC�boolrM�
__classcell__rr)rrr
s0





r)ZloggingrZtypingrrZcloudinit.net.netops.bsd_netopsrZnetopsrZ	cloudinitrrrrZcloudinit.distrosr	r
Zcloudinit.distros.networkingrZ	getLoggerrNr&ZDistror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