/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__/alpine.cpython-36.pyc (6947B)
3 \me!@sdddlZddlZddlmZmZmZmZddlmZddl m Z ej e Z dZGdddejZdS)N)distroshelperssubputil) HostnameConf) PER_INSTANCEa7# 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} c@seZdZdZdZdZdZdeediZddZ d d Z d0d d Z e j dddZddZddZddZd1ddZddZeeeedddZddZd2d d!Zd"d#Zed$d%Zd3d(d)Zed*d+Zed d,eeed-d.d/Zd S)4Distrozpy3-pipz/usr/share/bkeymaps/z&/etc/profile.d/50-cloud-init-locale.shz/etc/network/interfacesZeni)Zeni_pathZ eni_headercCs6tjj||||tj||_d|_d|_d|d<dS)NzC.UTF-8ZalpineZsshdZ ssh_svcname)rr__init__rZRunners_runnerdefault_localeZosfamily)selfnameZcfgpathsr/usr/lib/python3.6/alpine.pyr %s  zDistro.__init__cCs|jS)zgThe default locale for Alpine Linux is different than cloud-init's DataSource default. )r )r rrr get_locale/szDistro.get_localeNcCsB|s |j}|s|j}ddddd|ddg}tj|dj|ddS) N#z?# This file is created by cloud-init once per new instance bootzexport CHARSET=UTF-8zexport LANG=%szexport LC_COLLATE=C i)r locale_conf_fnr write_filejoin)r ZlocaleZout_fnlinesrrr apply_locale5szDistro.apply_locale)pkglistcCs|j|jd|ddS)Nadd)pkgs)update_package_sourcespackage_command)r rrrrinstall_packagesHszDistro.install_packagesc Csnd}y|j|}Wn.tk r@tj|jdd}|r8ndSYnX|sNtd}|j|tj|t|ddS)Ncreate_hostname_fileTri) _read_hostname_confIOErrorrZget_cfg_option_boolZ_cfgrZ set_hostnamerstr)r hostnamefilenameconfr rrr_write_hostnameLs   zDistro._write_hostnamecCs|j|j}|j|fS)N)_read_hostnameZhostname_conf_fn)r Z sys_hostnamerrr_read_system_hostname_s zDistro._read_system_hostnamecCsttj|}|j|S)N)rrZ load_fileparse)r r%r&rrrr!cszDistro._read_hostname_confc Cs:d}y|j|}|j}Wntk r,YnX|s6|S|S)N)r!r$r")r r%defaultr$r&rrrr(hs  zDistro._read_hostnamecCsdS)Nz 127.0.1.1r)r rrr_get_localhost_ipsszDistro._get_localhost_ip)layoutmodelvariantoptionscCs|sd}tj|t|tjj|j|}tjj|sPd|}tj|t||sjd}tj|t|tjj|d|}tjj|sd|}tj|t||rtj d|rtj dt j d||gdS) NzKeyboard layout not specified.z,Keyboard layout directory %s does not exist.zKeyboard variant not specified.z %s.bmap.gzz(Keyboard variant file %s does not exist.z+Keyboard model is ignored for Alpine Linux.z.Keyboard options are ignored for Alpine Linux.z setup-keymap) LOGerror RuntimeErrorospathr keymap_pathisdirisfileZwarningr)r r-r.r/r0msgZkeymap_layout_pathZkeymap_variant_pathrrr set_keymapvs4         zDistro.set_keymapcCstj||j|ddS)N)tzZtz_file)rZset_etc_timezoneZ _find_tz_file)r r;rrr set_timezoneszDistro.set_timezonecCs|dkr g}dg}|jd|r6t|tr6|j|n|rNt|trN|j||r\|j||dkrr|jddgtjd|}|j|tj|dddS) NZapkz--quietZupgradez--update-cachez --availablez%s-%sF)capture)append isinstancer#listextendrZexpand_package_listr)r commandargsrcmdrrrrrs      zDistro.package_commandcCs|jjd|jdgtddS)Nzupdate-sourcesupdate)Zfreq)r Zrunrr)r rrrrs zDistro.update_package_sourcescCs|jsddg|_|jS)z7Allow distro to determine the preferred ntp client listZchronyZntp)Z_preferred_ntp_clients)r rrrpreferred_ntp_clientss zDistro.preferred_ntp_clientspoweroffnowcCsn|dg}|dkr|dg7}nNy|jtt|dWn2tk rh}ztd|f|WYdd}~XnX|S)Nz-drH0<z?power_state[delay] must be 'now' or '+m' (minutes). found '%s'.)r>r#int ValueError TypeError)r modeZdelaymessagerBerrrshutdown_commands zDistro.shutdown_commandcCsdS)z1 Alpine uses OpenRC, not systemd Frrrrr uses_systemdszDistro.uses_systemd)rcs)actionservice extra_argsc Gsddg}ddg}t||dgt||dgt|d|gt|d|gt||dgt||dgt||dgt||d gd }t||}tj|d |d S) a< Perform the requested action on a service. This handles OpenRC specific implementation details. OpenRC has two distinct commands relating to services, 'rc-service' and 'rc-update' and the order of their argument lists differ. May raise ProcessExecutionError z rc-servicez --nocolorz rc-updatestopstartdelrrestartstatus)rWrXdisableenablerZreloadz try-reloadr[T)r=rS)r@r) r rTrUrSrVZinit_cmdZ update_cmdZcmdsrDrrrmanage_services  zDistro.manage_service)N)N)NN)rGrHN) __name__ __module__ __qualname__Zpip_package_namer6rZnetwork_conf_fnNETWORK_FILE_HEADERZrenderer_configsr rrrZ PackageListrr'r)r!r(r,r#r:r<rrpropertyrFrQ staticmethodrR classmethodr_rrrrrs.   "    r)Zloggingr4Z cloudinitrrrrZ"cloudinit.distros.parsers.hostnamerZcloudinit.settingsrZ getLoggerr`r1rcrrrrr s