/usr/lib/python3/dist-packages/cloudinit/distros/__pycache__
NameSizeModeActions
almalinux.cpython-310.pyc3590644editdlrm
alpine.cpython-310.pyc144450644editdlrm
amazon.cpython-310.pyc6250644editdlrm
aosc.cpython-310.pyc44290644editdlrm
arch.cpython-310.pyc43560644editdlrm
azurelinux.cpython-310.pyc20680644editdlrm
bsd.cpython-310.pyc62770644editdlrm
bsd_utils.cpython-310.pyc11590644editdlrm
centos.cpython-310.pyc3560644editdlrm
cloudlinux.cpython-310.pyc3600644editdlrm
cos.cpython-310.pyc3550644editdlrm
debian.cpython-310.pyc81690644editdlrm
dragonflybsd.cpython-310.pyc4070644editdlrm
eurolinux.cpython-310.pyc3590644editdlrm
fedora.cpython-310.pyc3560644editdlrm
freebsd.cpython-310.pyc71240644editdlrm
gentoo.cpython-310.pyc38710644editdlrm
mariner.cpython-310.pyc16760644editdlrm
miraclelinux.cpython-310.pyc3620644editdlrm
netbsd.cpython-310.pyc50160644editdlrm
networking.cpython-310.pyc123290644editdlrm
openbsd.cpython-310.pyc25540644editdlrm
OpenCloudOS.cpython-310.pyc5900644editdlrm
openeuler.cpython-310.pyc5860644editdlrm
openmandriva.cpython-310.pyc3640644editdlrm
opensuse-leap.cpython-310.pyc3670644editdlrm
opensuse-microos.cpython-310.pyc3700644editdlrm
opensuse-tumbleweed.cpython-310.pyc3730644editdlrm
opensuse.cpython-310.pyc66110644editdlrm
photon.cpython-310.pyc46700644editdlrm
raspberry_pi_os.cpython-310.pyc19580644editdlrm
rhel.cpython-310.pyc52270644editdlrm
rhel_util.cpython-310.pyc10110644editdlrm
rocky.cpython-310.pyc3550644editdlrm
sle-micro.cpython-310.pyc3630644editdlrm
sles.cpython-310.pyc3580644editdlrm
sle_hpc.cpython-310.pyc3610644editdlrm
suse.cpython-310.pyc3580644editdlrm
TencentOS.cpython-310.pyc5880644editdlrm
ubuntu.cpython-310.pyc22050644editdlrm
ug_util.cpython-310.pyc40530644editdlrm
virtuozzo.cpython-310.pyc3590644editdlrm
__init__.cpython-310.pyc450610644editdlrm
Edit: /usr/lib/python3/dist-packages/cloudinit/distros/__pycache__/photon.cpython-310.pyc (4670B)
o thn@slddlZddlmZmZmZmZmZddlmZddlm Z ddl m Z m Z eeZGdddejZdS)N)distroshelpersnetsubputil) PackageList) rhel_util) PER_ALWAYS PER_INSTANCEc@seZdZdZdZdZdZdeediZdZdd Z d$d d Z d d Z d%ddZ de fddZddZddZd%ddZddZddZd&ddZd d!d"d#ZdS)'Distroz /etc/hostnamez/etc/systemd/network/z/etc/locale.confz/etc/systemd/resolved.confnetworkd)resolv_conf_fnnetwork_conf_dirTcCs0tj||||t||_d|_dg|_dS)Nphoton systemctl)rr __init__rRunners_runnerosfamilyinit_cmd)selfnamecfgpathsr:/usr/lib/python3/dist-packages/cloudinit/distros/photon.pyrs  zDistro.__init__cCsntd|ztj||d\}}|rtd||d||fWSd||fWStjy6ttd|YdSw)NzAttempting to run: %s)capturez(Running %s resulted in stderr output: %sTFzCommand %s failed)TNN)LOGdebugrwarningProcessExecutionErrorrlogexc)rcmdrouterrrrrexec_cmd(s   zDistro.exec_cmdcCs:d}|j|d}td|||stStddS)Ndisable_fallback_netcfgTz%s value is: %szJSkipping generate_fallback_config. Rely on PhotonOS default network config)_cfggetrrrgenerate_fallback_configinfo)rkeyr&rrrr)6szDistro.generate_fallback_configNcCs4|s|j}d|i}t||gd}||dS)NLANG)rrestartzsystemd-localed)systemd_locale_conf_fnrhutilupdate_sysconfig_filer%)rlocaleout_fn locale_cfgr"rrr apply_localeDs zDistro.apply_localepkglistcCs|jd|ddS)Ninstall)pkgs)package_command)rr5rrrinstall_packagesVszDistro.install_packagescCs|r|drt||dSd}t|jdd}|r)|ddt|g\}}}n|dddt|g\}}}td|rHt d||fdSdS) N/previous-hostnamecreate_hostname_fileT hostnamectlz set-hostnamez --transientz7create_hostname_file is False; hostname set transientlyz3Error while setting hostname: %s Given hostname: %s) endswithr write_fileget_cfg_option_boolr'r%strrr*r)rhostnamefilenameretr;_outr$rrr_write_hostnameZs8   zDistro._write_hostnamecCs||j}|j|fSN)_read_hostnamesystemd_hostname_conf_fn)r sys_hostnamerrr_read_system_hostname{s  zDistro._read_system_hostnamecCs@|r|drt|S|ddg\}}}|r|S|S)Nr:rAz-f)r=rload_text_filestripr%)rrBdefault_retr#_errrrrrGszDistro._read_hostnamecCsdS)Nz 127.0.1.1r)rrrr_get_localhost_ipszDistro._get_localhost_ipcCstj|||ddS)N)tztz_file)rset_etc_timezone _find_tz_file)rrQrrr set_timezoneszDistro.set_timezonec Cs|sg}ddg}|rt|tr||n |r!t|tr!||||td|}||||\}}}|rCt d|dSdS)Ntdnfz-yz%s-%sz#Error while installing packages: %s) isinstancer@appendlistextendrexpand_package_listr%rerror) rcommandargsr7r"r5rCrDr$rrrr8s     zDistro.package_commandF)forcecCs$|jjd|jdg|r tntddS)Nzupdate-sources makecache)freq)rrunr8r r )rr_rrrupdate_package_sourcess   zDistro.update_package_sources)TrF)NN)__name__ __module__ __qualname__rHrr.resolve_conf_fnrenderer_configs prefer_fqdnrr%r)r4rr9rErJrGrPrUr8rcrrrrr s.  !  r )logging cloudinitrrrrrcloudinit.distrosrrr/cloudinit.settingsr r getLoggerrdrr rrrrs