/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__/debian.cpython-36.pyc (7698B)
3 \me\'@sddlZddlZddlmZddlmZmZmZddlm Z ddl m Z ddl m Z ejeZdZdZd ZGd d d ejZdd dZedfddZdddZdddZdS)N)List)distrossubputil)Apt)PackageManager) HostnameConfa8# This file is generated from information provided by the datasource. Changes # to it will not persist across an instance reboot. To disable cloud-init's # network configuration capabilities, write a file # /etc/cloud/cloud.cfg.d/99-disable-network-config.cfg with the following: # network: {config: disabled} z'/etc/network/interfaces.d/50-cloud-initz/etc/default/localecseZdZdZdddZededededd dZfd d Zd d Zd'ddZ fddZ ddZ ddZ ddZ d(ddZddZddZd)d d!Zd"d#Zeeeed$d%d&ZZS)*Distroz /etc/hostnamez'/etc/network/interfaces.d/50-cloud-initz/etc/netplan/50-cloud-init.yaml)eninetplanr )Zeni_pathZ eni_headerr T)Z netplan_pathZnetplan_headerZpostcmdscs@tj|||d|_d|_d|_tj|j||_|jg|_ dS)NZdebianzC.UTF-8) super__init__Zosfamilydefault_locale system_localerZ from_configZ_runneraptZpackage_managers)selfnameZcfgpaths) __class__/usr/lib/python3.6/debian.pyr 3s zDistro.__init__cCs |jst|_|jr|jS|jS)z9Return the default locale if set, else use default locale)rread_system_localer)rrrr get_locale>szDistro.get_localeNLANGc Cs|st}|std|j}tjj|}|j }|rFtjdt|j ntjd|jt|j |j kpn| pn|}| p||p||}|rt |||dntjd||j||rt |||dd|_dS)zeApply specified locale to system, regenerate if specified locale differs from system default.zFailed to provide locale value.zVSystem locale not found in %s. Assuming system locale is %s based on hardcoded defaultzSystem locale set to %s via %s)keynamez9System has '%s=%s' requested '%s', skipping regeneration.N) LOCALE_CONF_FN ValueErrorrospathexistsrLOGdebugrlowerregenerate_localeupdate_locale_conf) rlocaleZout_fnrZ distro_localeZconf_fn_existsZsys_locale_unsetZ need_regenZ need_confrrr apply_localeIs<  zDistro.apply_localecsttj||S)N)_maybe_remove_legacy_eth0r _write_network_state)rargskwargs)rrrr(zszDistro._write_network_statec Csnd}y|j|}Wn.tk r@tj|jdd}|r8ndSYnX|sNtd}|j|tj|t|ddS)Ncreate_hostname_fileTi) _read_hostname_confIOErrorrZget_cfg_option_boolZ_cfgrZ set_hostname write_filestr)rhostnamefilenameconfr+rrr_write_hostname~s   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)rr load_fileparse)rr2r3rrrr-szDistro._read_hostname_confc Cs:d}y|j|}|j}Wntk r,YnX|s6|S|S)N)r-r1r.)rr2defaultr1r3rrrr5s  zDistro._read_hostnamecCsdS)Nz 127.0.1.1r)rrrr_get_localhost_ipszDistro._get_localhost_ipcCstj||j|ddS)N)tzZtz_file)rZset_etc_timezoneZ _find_tz_file)rr<rrr set_timezoneszDistro.set_timezonecCs(|dkrtd|d|jjddS)NZupgradezUnable to handle z command) RuntimeErrorrZrun_package_command)rZcommandr)Zpkgsrrrpackage_commandszDistro.package_commandcCstjS)N)rZget_dpkg_architecture)rrrrget_primary_archszDistro.get_primary_arch)layoutmodelvariantoptionsc Cs^djddd|dd|dd|dd|ddd dg }tjd |d d d |jdddS)N z'# This file was generated by cloud-initr,z XKBMODEL=""z XKBLAYOUT="z XKBVARIANT="z XKBOPTIONS="zBACKSPACE="guess"z/etc/default/keyboardiw)r2ZcontentmodeZomodeZrestartz console-setup)joinrr/Zmanage_service)rrArBrCrDcontentsrrr set_keymaps     zDistro.set_keymap)Nr)N)NN)__name__ __module__ __qualname__r6Znetwork_conf_fnNETWORK_FILE_HEADERZrenderer_configsr rr&r(r4r7r-r5r;r=r?r@r0rK __classcell__rr)rrr !s*   1   r "/etc/network/interfaces.d/eth0.cfgc Cstjj|sdSd}yPtj|}ddg}dd|jD}||krVtj|d|}n |d|}Wn tk r|d |}YnXtj |dS) aOUbuntu cloud images previously included a 'eth0.cfg' that had hard coded content. That file would interfere with the rendered configuration if it was present. if the file does not exist do nothing. If the file exists: - with known content, remove it and warn - with unknown content, leave it and warn Nz(Dynamic networking config may not apply.z auto eth0ziface eth0 inet dhcpcSsg|]}|jds|jqS)#) startswithstrip).0frrr sz-_maybe_remove_legacy_eth0..zremoved %s with known contentsz* '%s' exists with user configured content.z" %s exists, but could not be read.) rrrrr8 splitlinesZdel_file Exceptionr Zwarning)rZbmsgrJZknown_contentslinesmsgrrrr's    r'rcCsDd}|std|tjj|r@tj|}tj|}|j|d}|S)z.Read system default locale setting, if presentr,zInvalid path: %s)rrrrrr8Zload_shell_contentget)sys_pathrZsys_valZlocale_contentZ sys_defaultsrrrrs     rcCs4tjd|||tjdd|d||fgdddS)zUpdate system locale configz%Updating %s with locale setting %s=%sz update-localez--locale-file=z%s=%sF)captureN)r r!r)r%r]rrrrr$s  r$cCs@|jd krtjd||dStjd|tjd|gdd dS) z Run locale-gen for the provided locale and set the default system variable `keyname` appropriately in the provided `sys_path`. cc.utf-8posixz$%s=%s does not require rengenerationNzGenerating locales for %sz locale-genF)r^)r_r`ra)r"r r!r)r%r]rrrrr#s  r#)rQ)r)r)ZloggingrZtypingrZ cloudinitrrrZ(cloudinit.distros.package_management.aptrZ4cloudinit.distros.package_management.package_managerrZ"cloudinit.distros.parsers.hostnamerZ getLoggerrLr rOZNETWORK_CONF_FNrr r'rr$r#rrrr s      9