OXIESEC PANEL
- Current Dir:
/
/
usr
/
lib
/
python3
/
dist-packages
/
cloudinit
/
distros
Server IP: 10.0.0.4
Upload:
Create Dir:
Name
Size
Modified
Perms
📁
..
-
07/01/2022 06:30:50 AM
rwxr-xr-x
📄
__init__.py
39.71 KB
05/18/2022 04:04:36 PM
rw-r--r--
📁
__pycache__
-
07/01/2022 06:30:50 AM
rwxr-xr-x
📄
almalinux.py
174 bytes
05/18/2022 04:04:36 PM
rw-r--r--
📄
alpine.py
5.61 KB
05/18/2022 04:04:36 PM
rw-r--r--
📄
amazon.py
615 bytes
05/18/2022 04:04:36 PM
rw-r--r--
📄
arch.py
8.32 KB
05/18/2022 04:04:36 PM
rw-r--r--
📄
bsd.py
4.61 KB
05/18/2022 04:04:36 PM
rw-r--r--
📄
bsd_utils.py
1.42 KB
05/18/2022 04:04:36 PM
rw-r--r--
📄
centos.py
174 bytes
05/18/2022 04:04:36 PM
rw-r--r--
📄
cloudlinux.py
174 bytes
05/18/2022 04:04:36 PM
rw-r--r--
📄
debian.py
13.36 KB
05/18/2022 04:04:36 PM
rw-r--r--
📄
dragonflybsd.py
253 bytes
05/18/2022 04:04:36 PM
rw-r--r--
📄
eurolinux.py
174 bytes
05/18/2022 04:04:36 PM
rw-r--r--
📄
fedora.py
460 bytes
05/18/2022 04:04:36 PM
rw-r--r--
📄
freebsd.py
5.56 KB
05/18/2022 04:04:36 PM
rw-r--r--
📄
gentoo.py
8.95 KB
05/18/2022 04:04:36 PM
rw-r--r--
📄
miraclelinux.py
174 bytes
05/18/2022 04:04:36 PM
rw-r--r--
📄
net_util.py
6.42 KB
05/18/2022 04:04:36 PM
rw-r--r--
📄
netbsd.py
4.78 KB
05/18/2022 04:04:36 PM
rw-r--r--
📄
networking.py
9.02 KB
05/18/2022 04:04:36 PM
rw-r--r--
📄
openEuler.py
174 bytes
05/18/2022 04:04:36 PM
rw-r--r--
📄
openbsd.py
1.41 KB
05/18/2022 04:04:36 PM
rw-r--r--
📄
opensuse.py
6.78 KB
05/18/2022 04:04:36 PM
rw-r--r--
📁
parsers
-
07/01/2022 06:30:50 AM
rwxr-xr-x
📄
photon.py
4.74 KB
05/18/2022 04:04:36 PM
rw-r--r--
📄
rhel.py
7.08 KB
05/18/2022 04:04:36 PM
rw-r--r--
📄
rhel_util.py
1.44 KB
05/18/2022 04:04:36 PM
rw-r--r--
📄
rocky.py
174 bytes
05/18/2022 04:04:36 PM
rw-r--r--
📄
sles.py
270 bytes
05/18/2022 04:04:36 PM
rw-r--r--
📄
ubuntu.py
1.85 KB
05/18/2022 04:04:36 PM
rw-r--r--
📄
ug_util.py
9.8 KB
05/18/2022 04:04:36 PM
rw-r--r--
📄
virtuozzo.py
174 bytes
05/18/2022 04:04:36 PM
rw-r--r--
Editing: ubuntu.py
Close
# 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 import util 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: (_name, _version, codename) = util.system_info()["dist"] # Xenial cloud-init only installed ntp, UbuntuCore has timesyncd. if codename == "xenial" and not util.system_is_snappy(): self._preferred_ntp_clients = ["ntp"] else: self._preferred_ntp_clients = copy.deepcopy( PREFERRED_NTP_CLIENTS ) return self._preferred_ntp_clients # vi: ts=4 expandtab