Linux web-conference.aiou.edu.pk 5.4.0-204-generic #224-Ubuntu SMP Thu Dec 5 13:38:28 UTC 2024 x86_64
Apache/2.4.41 (Ubuntu)
: 172.16.50.247 | : 18.227.46.202
Cant Read [ /etc/named.conf ]
7.4.3-4ubuntu2.28
appadmin
www.github.com/MadExploits
Terminal
AUTO ROOT
Adminer
Backdoor Destroyer
Linux Exploit
Lock Shell
Lock File
Create User
CREATE RDP
PHP Mailer
BACKCONNECT
UNLOCK SHELL
HASH IDENTIFIER
CPANEL RESET
CREATE WP USER
BLACK DEFEND!
README
+ Create Folder
+ Create File
/
usr /
lib /
python3 /
dist-packages /
cloudinit /
distros /
[ HOME SHELL ]
Name
Size
Permission
Action
__pycache__
[ DIR ]
drwxr-xr-x
package_management
[ DIR ]
drwxr-xr-x
parsers
[ DIR ]
drwxr-xr-x
OpenCloudOS.py
277
B
-rw-r--r--
TencentOS.py
277
B
-rw-r--r--
__init__.py
65.15
KB
-rw-r--r--
almalinux.py
151
B
-rw-r--r--
alpine.py
24.35
KB
-rw-r--r--
amazon.py
907
B
-rw-r--r--
aosc.py
4.38
KB
-rw-r--r--
arch.py
4.92
KB
-rw-r--r--
azurelinux.py
2.35
KB
-rw-r--r--
bsd.py
6.34
KB
-rw-r--r--
bsd_utils.py
1.41
KB
-rw-r--r--
centos.py
151
B
-rw-r--r--
cloudlinux.py
151
B
-rw-r--r--
cos.py
247
B
-rw-r--r--
debian.py
10.6
KB
-rw-r--r--
dragonflybsd.py
230
B
-rw-r--r--
eurolinux.py
151
B
-rw-r--r--
fedora.py
437
B
-rw-r--r--
freebsd.py
8.53
KB
-rw-r--r--
gentoo.py
4.57
KB
-rw-r--r--
mariner.py
1.7
KB
-rw-r--r--
miraclelinux.py
151
B
-rw-r--r--
netbsd.py
5.51
KB
-rw-r--r--
networking.py
10.81
KB
-rw-r--r--
openbsd.py
2.37
KB
-rw-r--r--
openeuler.py
275
B
-rw-r--r--
openmandriva.py
237
B
-rw-r--r--
opensuse-leap.py
247
B
-rw-r--r--
opensuse-microos.py
247
B
-rw-r--r--
opensuse-tumbleweed.py
247
B
-rw-r--r--
opensuse.py
9.96
KB
-rw-r--r--
photon.py
5.36
KB
-rw-r--r--
rhel.py
7.98
KB
-rw-r--r--
rhel_util.py
1.4
KB
-rw-r--r--
rocky.py
151
B
-rw-r--r--
sle-micro.py
247
B
-rw-r--r--
sle_hpc.py
247
B
-rw-r--r--
sles.py
247
B
-rw-r--r--
suse.py
81
B
-rw-r--r--
ubuntu.py
2.32
KB
-rw-r--r--
ug_util.py
9.77
KB
-rw-r--r--
virtuozzo.py
151
B
-rw-r--r--
Delete
Unzip
Zip
${this.title}
Close
Code Editor : aosc.py
# Copyright (C) 2024 AOSC Developers # # Author: Yuanhang Sun <leavelet@aosc.io> # # This file is part of cloud-init. See LICENSE file for license information. import logging from cloudinit import distros, helpers, subp, util from cloudinit.distros import PackageList from cloudinit.distros.parsers.hostname import HostnameConf from cloudinit.distros.parsers.sys_conf import SysConf from cloudinit.settings import PER_INSTANCE LOG = logging.getLogger(__name__) class Distro(distros.Distro): systemd_locale_conf_fn = "/etc/locale.conf" init_cmd = ["systemctl"] network_conf_dir = "/etc/sysconfig/network" resolve_conf_fn = "/etc/systemd/resolved.conf" tz_local_fn = "/etc/localtime" dhclient_lease_directory = "/var/lib/NetworkManager" dhclient_lease_file_regex = r"dhclient-[\w-]+\.lease" renderer_configs = { "sysconfig": { "control": "etc/sysconfig/network", "iface_templates": "%(base)s/network-scripts/ifcfg-%(name)s", "route_templates": { "ipv4": "%(base)s/network-scripts/route-%(name)s", "ipv6": "%(base)s/network-scripts/route6-%(name)s", }, } } prefer_fqdn = False def __init__(self, name, cfg, paths): distros.Distro.__init__(self, name, cfg, paths) self._runner = helpers.Runners(paths) self.osfamily = "aosc" self.default_locale = "en_US.UTF-8" cfg["ssh_svcname"] = "sshd" def apply_locale(self, locale, out_fn=None): if not out_fn: out_fn = self.systemd_locale_conf_fn locale_cfg = { "LANG": locale, } update_locale_conf(out_fn, locale_cfg) def _write_hostname(self, hostname, filename): if filename.endswith("/previous-hostname"): conf = HostnameConf("") conf.set_hostname(hostname) util.write_file(filename, str(conf), 0o644) create_hostname_file = util.get_cfg_option_bool( self._cfg, "create_hostname_file", True ) if create_hostname_file: subp.subp(["hostnamectl", "set-hostname", str(hostname)]) else: subp.subp( [ "hostnamectl", "set-hostname", "--transient", str(hostname), ] ) LOG.info("create_hostname_file is False; hostname set transiently") def _read_hostname(self, filename, default=None): if filename.endswith("/previous-hostname"): return util.load_text_file(filename).strip() (out, _err) = subp.subp(["hostname"]) out = out.strip() if len(out): return out else: return default def _read_system_hostname(self): sys_hostname = self._read_hostname(self.hostname_conf_fn) return (self.hostname_conf_fn, sys_hostname) def set_timezone(self, tz): tz_file = self._find_tz_file(tz) util.del_file(self.tz_local_fn) util.sym_link(tz_file, self.tz_local_fn) def package_command(self, command, args=None, pkgs=None): if pkgs is None: pkgs = [] cmd = ["oma"] if command: cmd.append(command) cmd.append("-y") cmd.extend(pkgs) subp.subp(cmd, capture=False) def install_packages(self, pkglist: PackageList): self.package_command("install", pkgs=pkglist) def update_package_sources(self, *, force=False): self._runner.run( "update-sources", self.package_command, "refresh", freq=PER_INSTANCE, ) def read_locale_conf(sys_path): exists = False try: contents = util.load_text_file(sys_path).splitlines() exists = True except IOError: contents = [] return (exists, SysConf(contents)) def update_locale_conf(sys_path, locale_cfg): if not locale_cfg: return (exists, contents) = read_locale_conf(sys_path) updated_am = 0 for k, v in locale_cfg.items(): if v is None: continue v = str(v) if len(v) == 0: continue contents[k] = v updated_am += 1 if updated_am: lines = [ str(contents), ] if not exists: lines.insert(0, util.make_header()) util.write_file(sys_path, "\n".join(lines) + "\n", 0o644)
Close