OXIESEC PANEL
- Current Dir:
/
/
usr
/
lib
/
python3
/
dist-packages
/
cloudinit
/
distros
Server IP: 139.59.38.164
Upload:
Create Dir:
Name
Size
Modified
Perms
π
..
-
05/09/2024 07:15:07 AM
rwxr-xr-x
π
OpenCloudOS.py
277 bytes
04/20/2023 09:31:09 PM
rw-r--r--
π
TencentOS.py
277 bytes
04/20/2023 09:31:09 PM
rw-r--r--
π
__init__.py
42.84 KB
04/20/2023 09:31:09 PM
rw-r--r--
π
__pycache__
-
05/09/2024 07:15:08 AM
rwxr-xr-x
π
almalinux.py
174 bytes
04/20/2023 09:31:09 PM
rw-r--r--
π
alpine.py
6.73 KB
04/20/2023 09:31:09 PM
rw-r--r--
π
amazon.py
615 bytes
04/20/2023 09:31:09 PM
rw-r--r--
π
arch.py
8.34 KB
04/20/2023 09:31:09 PM
rw-r--r--
π
bsd.py
4.91 KB
04/20/2023 09:31:09 PM
rw-r--r--
π
bsd_utils.py
1.42 KB
04/20/2023 09:31:09 PM
rw-r--r--
π
centos.py
174 bytes
04/20/2023 09:31:09 PM
rw-r--r--
π
cloudlinux.py
174 bytes
04/20/2023 09:31:09 PM
rw-r--r--
π
cos.py
270 bytes
04/20/2023 09:31:09 PM
rw-r--r--
π
debian.py
13.36 KB
04/20/2023 09:31:09 PM
rw-r--r--
π
dragonflybsd.py
253 bytes
04/20/2023 09:31:09 PM
rw-r--r--
π
eurolinux.py
174 bytes
04/20/2023 09:31:09 PM
rw-r--r--
π
fedora.py
460 bytes
04/20/2023 09:31:09 PM
rw-r--r--
π
freebsd.py
6.44 KB
04/20/2023 09:31:09 PM
rw-r--r--
π
gentoo.py
8.95 KB
04/20/2023 09:31:09 PM
rw-r--r--
π
mariner.py
1.72 KB
04/20/2023 09:31:09 PM
rw-r--r--
π
miraclelinux.py
174 bytes
04/20/2023 09:31:09 PM
rw-r--r--
π
net_util.py
6.42 KB
04/20/2023 09:31:09 PM
rw-r--r--
π
netbsd.py
4.43 KB
04/20/2023 09:31:09 PM
rw-r--r--
π
networking.py
11.08 KB
04/20/2023 09:31:09 PM
rw-r--r--
π
openEuler.py
298 bytes
04/20/2023 09:31:09 PM
rw-r--r--
π
openbsd.py
1.86 KB
04/20/2023 09:31:09 PM
rw-r--r--
π
openmandriva.py
260 bytes
04/20/2023 09:31:09 PM
rw-r--r--
π
opensuse-leap.py
270 bytes
04/20/2023 09:31:09 PM
rw-r--r--
π
opensuse-microos.py
270 bytes
04/20/2023 09:31:09 PM
rw-r--r--
π
opensuse-tumbleweed.py
270 bytes
04/20/2023 09:31:09 PM
rw-r--r--
π
opensuse.py
9.36 KB
04/20/2023 09:31:09 PM
rw-r--r--
π
parsers
-
05/09/2024 07:15:08 AM
rwxr-xr-x
π
photon.py
4.74 KB
04/20/2023 09:31:09 PM
rw-r--r--
π
rhel.py
7.11 KB
04/20/2023 09:31:09 PM
rw-r--r--
π
rhel_util.py
1.44 KB
04/20/2023 09:31:09 PM
rw-r--r--
π
rocky.py
174 bytes
04/20/2023 09:31:09 PM
rw-r--r--
π
sle-micro.py
270 bytes
04/20/2023 09:31:09 PM
rw-r--r--
π
sle_hpc.py
270 bytes
04/20/2023 09:31:09 PM
rw-r--r--
π
sles.py
270 bytes
04/20/2023 09:31:09 PM
rw-r--r--
π
ubuntu.py
1.5 KB
04/20/2023 09:31:09 PM
rw-r--r--
π
ug_util.py
9.8 KB
04/20/2023 09:31:09 PM
rw-r--r--
π
virtuozzo.py
174 bytes
04/20/2023 09:31:09 PM
rw-r--r--
Editing: openbsd.py
Close
# Copyright (C) 2019-2020 GonΓ©ri Le Bouder # # This file is part of cloud-init. See LICENSE file for license information. import os import cloudinit.distros.netbsd from cloudinit import log as logging from cloudinit import subp, util LOG = logging.getLogger(__name__) class Distro(cloudinit.distros.netbsd.NetBSD): hostname_conf_fn = "/etc/myname" init_cmd = ["rcctl"] def _read_hostname(self, filename, default=None): return util.load_file(self.hostname_conf_fn) def _write_hostname(self, hostname, filename): content = hostname + "\n" util.write_file(self.hostname_conf_fn, content) def _get_add_member_to_group_cmd(self, member_name, group_name): return ["usermod", "-G", group_name, member_name] def manage_service(self, action: str, service: str): """ Perform the requested action on a service. This handles OpenBSD's 'rcctl'. May raise ProcessExecutionError """ init_cmd = self.init_cmd cmds = { "stop": ["stop", service], "start": ["start", service], "enable": ["enable", service], "disable": ["disable", service], "restart": ["restart", service], "reload": ["restart", service], "try-reload": ["restart", service], "status": ["check", service], } cmd = list(init_cmd) + list(cmds[action]) return subp.subp(cmd, capture=True) def lock_passwd(self, name): try: subp.subp(["usermod", "-p", "*", name]) except Exception: util.logexc(LOG, "Failed to lock user %s", name) raise def unlock_passwd(self, name): pass def _get_pkg_cmd_environ(self): """Return env vars used in OpenBSD package_command operations""" e = os.environ.copy() return e # vi: ts=4 expandtab