/usr/lib/python3.6/site-packages/cloudinit/distros/__pycache__
NameSizeModeActions
almalinux.cpython-36.opt-1.pyc3130644editdlrm
almalinux.cpython-36.pyc3130644editdlrm
alpine.cpython-36.opt-1.pyc69470644editdlrm
alpine.cpython-36.pyc69470644editdlrm
amazon.cpython-36.opt-1.pyc4500644editdlrm
amazon.cpython-36.pyc4500644editdlrm
arch.cpython-36.opt-1.pyc75090644editdlrm
arch.cpython-36.pyc75090644editdlrm
bsd.cpython-36.opt-1.pyc49910644editdlrm
bsd.cpython-36.pyc49910644editdlrm
bsd_utils.cpython-36.opt-1.pyc11180644editdlrm
bsd_utils.cpython-36.pyc11180644editdlrm
centos.cpython-36.opt-1.pyc3100644editdlrm
centos.cpython-36.pyc3100644editdlrm
cloudlinux.cpython-36.opt-1.pyc3140644editdlrm
cloudlinux.cpython-36.pyc3140644editdlrm
cos.cpython-36.opt-1.pyc3090644editdlrm
cos.cpython-36.pyc3090644editdlrm
debian.cpython-36.opt-1.pyc76980644editdlrm
debian.cpython-36.pyc76980644editdlrm
dragonflybsd.cpython-36.opt-1.pyc3610644editdlrm
dragonflybsd.cpython-36.pyc3610644editdlrm
eurolinux.cpython-36.opt-1.pyc3130644editdlrm
eurolinux.cpython-36.pyc3130644editdlrm
fedora.cpython-36.opt-1.pyc3100644editdlrm
fedora.cpython-36.pyc3100644editdlrm
freebsd.cpython-36.opt-1.pyc63590644editdlrm
freebsd.cpython-36.pyc63590644editdlrm
gentoo.cpython-36.opt-1.pyc70720644editdlrm
gentoo.cpython-36.pyc70720644editdlrm
mariner.cpython-36.opt-1.pyc15760644editdlrm
mariner.cpython-36.pyc15760644editdlrm
miraclelinux.cpython-36.opt-1.pyc3160644editdlrm
miraclelinux.cpython-36.pyc3160644editdlrm
netbsd.cpython-36.opt-1.pyc46880644editdlrm
netbsd.cpython-36.pyc46880644editdlrm
networking.cpython-36.opt-1.pyc125060644editdlrm
networking.cpython-36.pyc125060644editdlrm
net_util.cpython-36.opt-1.pyc18890644editdlrm
net_util.cpython-36.pyc18890644editdlrm
openbsd.cpython-36.opt-1.pyc23130644editdlrm
openbsd.cpython-36.pyc23130644editdlrm
OpenCloudOS.cpython-36.opt-1.pyc5420644editdlrm
OpenCloudOS.cpython-36.pyc5420644editdlrm
openeuler.cpython-36.opt-1.pyc5380644editdlrm
openeuler.cpython-36.pyc5380644editdlrm
openmandriva.cpython-36.opt-1.pyc3180644editdlrm
openmandriva.cpython-36.pyc3180644editdlrm
opensuse-leap.cpython-36.opt-1.pyc3210644editdlrm
opensuse-leap.cpython-36.pyc3210644editdlrm
opensuse-microos.cpython-36.opt-1.pyc3240644editdlrm
opensuse-microos.cpython-36.pyc3240644editdlrm
opensuse-tumbleweed.cpython-36.opt-1.pyc3270644editdlrm
opensuse-tumbleweed.cpython-36.pyc3270644editdlrm
opensuse.cpython-36.opt-1.pyc64290644editdlrm
opensuse.cpython-36.pyc64290644editdlrm
photon.cpython-36.opt-1.pyc44160644editdlrm
photon.cpython-36.pyc44160644editdlrm
rhel.cpython-36.opt-1.pyc49320644editdlrm
rhel.cpython-36.pyc49320644editdlrm
rhel_util.cpython-36.opt-1.pyc9690644editdlrm
rhel_util.cpython-36.pyc9690644editdlrm
rocky.cpython-36.opt-1.pyc3090644editdlrm
rocky.cpython-36.pyc3090644editdlrm
sle-micro.cpython-36.opt-1.pyc3170644editdlrm
sle-micro.cpython-36.pyc3170644editdlrm
sles.cpython-36.opt-1.pyc3120644editdlrm
sles.cpython-36.pyc3120644editdlrm
sle_hpc.cpython-36.opt-1.pyc3150644editdlrm
sle_hpc.cpython-36.pyc3150644editdlrm
suse.cpython-36.opt-1.pyc3120644editdlrm
suse.cpython-36.pyc3120644editdlrm
TencentOS.cpython-36.opt-1.pyc5400644editdlrm
TencentOS.cpython-36.pyc5400644editdlrm
ubuntu.cpython-36.opt-1.pyc14840644editdlrm
ubuntu.cpython-36.pyc14840644editdlrm
ug_util.cpython-36.opt-1.pyc40040644editdlrm
ug_util.cpython-36.pyc40040644editdlrm
virtuozzo.cpython-36.opt-1.pyc3130644editdlrm
virtuozzo.cpython-36.pyc3130644editdlrm
__init__.cpython-36.opt-1.pyc364580644editdlrm
__init__.cpython-36.pyc364580644editdlrm
Edit: /usr/lib/python3.6/site-packages/cloudinit/distros/__pycache__/gentoo.cpython-36.pyc (7072B)
3 \met$@spddlZddlmZmZmZmZddlmZmZddl m Z ddl m Z ej eZGdddejZdd ZdS) N)distroshelperssubputil) PackageListnet_util) HostnameConf) PER_INSTANCEc@seZdZdZdZdZdZdgZdZddgZ d d Z d'd d Z e dddZ ddZeddZddZddZddZddZeddZd(dd Zd!d"Zd)d#d$Zd%d&Zd S)*Distroz/etc/env.d/02localez/etc/locale.genz/etc/conf.d/netz/etc/conf.d/hostnamez rc-servicez en_US.UTF-8z C.UTF8 UTF-8zen_US.UTF-8 UTF-8cCsBtjj||||tj||_d|_d|d<tjr>tj ddS)NZgentooz/etc/init.d/sshdZ ssh_svcnamez/Cloud-init does not support systemd with gentoo) rr __init__rZRunners_runnerZosfamilyZ uses_systemdLOGerror)selfnameZcfgpathsr/usr/lib/python3.6/gentoo.pyr s  zDistro.__init__NcCsFtj|jdj|jddtjdgddtjddd |jgddd S) zrc-only - not compatible with systemd Locales need to be added to /etc/locale.gen and generated prior to selection. Default to en_US.UTF-8 for simplicity.  i)modez locale-genF)captureZeselectZlocalesetN)r write_file locale_gen_fnjoinlocalesrdefault_locale)r_Zout_fnrrr apply_locale+szDistro.apply_locale)pkglistcCs|j|jd|ddS)N)pkgs)update_package_sourcespackage_command)rrrrrinstall_packages;szDistro.install_packagesc Cstj|}tjd|||j}g}xx|jD]j\}}d|krP|j|d|dkrZq0|jd|}|jd}t |t t frt t |j dd}d} |jddkr| d j|d 7} n@| d j||jd |jd |jdd7} | dj||jdd7} |jdr| dj||d7} tj|| |j||jdr0dddj|d dg} y*tj| \} } t| rrtjd| | Wq0tjk rtjtd| Yq0Xq0W|rtj|jt||S)Nz3Translated ubuntu style network settings %s into %szdns-nameserverslo.,r Z bootprotoZdhcpzconfig_{name}="dhcp")rzEconfig_{name}="{ip_address} netmask {netmask}" mac_{name}="{hwaddr}" ZaddressnetmaskZ hwaddress)rZ ip_addressr(Zhwaddrz&routes_{name}="default via {gateway}" gateway)rr)z"dns_servers_{name}="{dnsservers}" )rZ dnsserversautoz rc-updateaddz net.{name}defaultz(Running %s resulted in stderr output: %sz#Running interface command %s failed)rZtranslate_networkr debugkeysitemsextendnetwork_conf_fnget isinstancelisttuplestrreplaceformatrr_create_network_symlinkrlenwarningProcessExecutionErrorlogexcZresolve_conf_fnconvert_resolv_conf) rsettingsZentriesZ dev_namesZ nameserversZdevinfoZnet_fnZdns_nameserversresultscmd_outerrrrr_write_network?sf          zDistro._write_networkcCs&dj|d}tj|s"tjd|dS)Nz/etc/init.d/net.{name})rz/etc/init.d/net.lo)r8ris_linkZsym_link)Zinterface_nameZ file_pathrrrr9s  zDistro._create_network_symlinkc Csld|dg}tjd||y(tj|\}}t|r@tjd||dStjk rftjtd|dSXdS)Nz/etc/init.d/net.%sZrestartz8Attempting to run bring up interface %s using command %sz(Running %s resulted in stderr output: %sTz#Running interface command %s failedF)r r-rr:r;r<rr=)rZ device_namerBrCrDrrr_bring_up_interfaces  zDistro._bring_up_interfacec Csd}x|D]}|dkr d}q W|rddg}y(tj|\}}t|rPtjd||Wn$tjk rvtjtd|dSXdd |jd D}tj j ||Stj j ||SdS) NFallTZlsz/etc/init.d/net.*z(Running %s resulted in stderr output: %sz#Running interface command %s failedcSsg|]}|jddqS)r&)split).0xrrr sz/Distro._bring_up_interfaces..z ) rr:r r;r<rr=rJrr _bring_up_interfaces)rZ device_namesZuse_alldrBrCrDZdevicesrrrrNs" zDistro._bring_up_interfacesc Csrd}y|j|}Wn.tk r@tj|jdd}|r8ndSYnX|sNtd}|jd|tj|t|ddS)Ncreate_hostname_fileTr z hostname="%s"i) _read_hostname_confIOErrorrZget_cfg_option_boolZ_cfgrZ set_hostnamerr6)rhostnamefilenameconfrPrrr_write_hostnames  zDistro._write_hostnamecCs|j|j}|j|fS)N)_read_hostnamehostname_conf_fn)rZ sys_hostnamerrr_read_system_hostnames zDistro._read_system_hostnamecCsttj|}|j|S)N)rrZ load_fileparse)rTrUrrrrQszDistro._read_hostname_confc Cs:d}y|j|}|j}Wntk r,YnX|s6|S|S)N)rQrSrR)rrTr,rSrUrrrrWs  zDistro._read_hostnamecCstj||j|ddS)N)tzZtz_file)rZset_etc_timezoneZ _find_tz_file)rr[rrr set_timezoneszDistro.set_timezonecCsdg}|jd|dkr(|jddgnb|dkr4g}|rNt|trN|j|n|rft|trf|j||rt|j|tjd|}|j|tj|dddS) NZemergez--quietZupgradez--updateZworldz%s-%sF)r)appendr0r3r6r4rZexpand_package_listr)rZcommandargsr!rBrrrrr#s      zDistro.package_commandcCs|jjd|jdgtddS)Nzupdate-sourcesz--sync)Zfreq)r Zrunr#r )rrrrr"s zDistro.update_package_sources)N)N)NN)__name__ __module__ __qualname__Zlocale_conf_fnrr1rXZinit_cmdrrr rrr$rE staticmethodr9rGrNrVrYrQrWr\r#r"rrrrr s* F    r cCs,d}t|tr(x|D]}|d|7}qW|S)z4Returns a settings string formatted for resolv.conf.r znameserver %s )r3r4)r?resultnsrrrr>s   r>)ZloggingZ cloudinitrrrrZcloudinit.distrosrrZ"cloudinit.distros.parsers.hostnamerZcloudinit.settingsr Z getLoggerr_r r r>rrrr s   r