File manager - Edit - /home/newsbmcs.com/public_html/static/img/logo/ubuntu.py.tar
Back
usr/lib/python3/dist-packages/cloudinit/distros/ubuntu.py 0000644 00000002775 15030036330 0017627 0 ustar 00 # Copyright (C) 2012 Canonical Ltd. # Copyright (C) 2012 Hewlett-Packard Development Company, L.P. # Copyright (C) 2012 Yahoo! Inc. # # Author: Scott Moser <scott.moser@canonical.com> # Author: Juerg Haefliger <juerg.haefliger@hp.com> # Author: Joshua Harlow <harlowja@yahoo-inc.com> # Author: Ben Howard <ben.howard@canonical.com> # # This file is part of cloud-init. See LICENSE file for license information. import copy from cloudinit.distros import PREFERRED_NTP_CLIENTS, debian class Distro(debian.Distro): def __init__(self, name, cfg, paths): super(Distro, self).__init__(name, cfg, paths) # Ubuntu specific network cfg locations self.network_conf_fn = { "eni": "/etc/network/interfaces.d/50-cloud-init.cfg", "netplan": "/etc/netplan/50-cloud-init.yaml", } self.renderer_configs = { "eni": { "eni_path": self.network_conf_fn["eni"], "eni_header": debian.NETWORK_FILE_HEADER, }, "netplan": { "netplan_path": self.network_conf_fn["netplan"], "netplan_header": debian.NETWORK_FILE_HEADER, "postcmds": True, }, } @property def preferred_ntp_clients(self): """The preferred ntp client is dependent on the version.""" if not self._preferred_ntp_clients: self._preferred_ntp_clients = copy.deepcopy(PREFERRED_NTP_CLIENTS) return self._preferred_ntp_clients # vi: ts=4 expandtab usr/lib/python3/dist-packages/sos/policies/distros/ubuntu.py 0000644 00000006253 15030042416 0020245 0 ustar 00 # This file is part of the sos project: https://github.com/sosreport/sos # # This copyrighted material is made available to anyone wishing to use, # modify, copy, or redistribute it subject to the terms and conditions of # version 2 of the GNU General Public License. # # See the LICENSE file in the source distribution for further information. import os from sos.report.plugins import UbuntuPlugin from sos.policies.distros.debian import DebianPolicy from sos.policies.package_managers.snap import SnapPackageManager from sos.policies.package_managers.dpkg import DpkgPackageManager from sos.policies.package_managers import MultiPackageManager class UbuntuPolicy(DebianPolicy): vendor = "Canonical" vendor_urls = [ ('Community Website', 'https://www.ubuntu.com/'), ('Commercial Support', 'https://www.canonical.com') ] os_release_name = 'Ubuntu' os_release_file = '' PATH = "/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games" \ + ":/usr/local/sbin:/usr/local/bin:/snap/bin" _upload_url = "https://files.support.canonical.com/uploads/" _upload_user = "ubuntu" _upload_password = "ubuntu" _upload_method = 'put' def __init__(self, sysroot=None, init=None, probe_runtime=True, remote_exec=None): super().__init__(sysroot=sysroot, init=init, probe_runtime=probe_runtime, remote_exec=remote_exec) self.package_manager = MultiPackageManager( primary=DpkgPackageManager, fallbacks=[SnapPackageManager], chroot=self.sysroot, remote_exec=remote_exec) try: if self.package_manager.pkg_by_name( 'sosreport')['pkg_manager'] == 'snap': self.sos_bin_path = '/snap/bin' except TypeError: # Use the default sos_bin_path pass self.valid_subclasses += [UbuntuPlugin] def dist_version(self): """ Returns the version stated in DISTRIB_RELEASE """ try: with open('/etc/lsb-release', 'r', encoding='utf-8') as fp: lines = fp.readlines() for line in lines: if "DISTRIB_RELEASE" in line: return float(line.split("=")[1].strip()) return False except (IOError, ValueError): return False def get_upload_https_auth(self, user=None, password=None): if self.upload_url.startswith(self._upload_url): return (self._upload_user, self._upload_password) return super().get_upload_https_auth() def get_upload_url_string(self): if self.upload_url.startswith(self._upload_url): return "Canonical Support File Server" return self._get_obfuscated_upload_url(self.get_upload_url()) def get_upload_url(self): if not self.upload_url or self.upload_url.startswith(self._upload_url): if not self.upload_archive_name: return self._upload_url fname = os.path.basename(self.upload_archive_name) return self._upload_url + fname return super().get_upload_url() # vim: set et ts=4 sw=4 :
| ver. 1.4 |
Github
|
.
| PHP 8.2.28 | Generation time: 0.02 |
proxy
|
phpinfo
|
Settings