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 : postinst-migrations.sh
#!/bin/sh # # Migrations from previous ubuntu-pro-client/ubuntu-advantage-tools versions # # These exist in this script separate from the *.postinst scripts because they # may need to be called from either ubuntu-pro-client.postinst or from # ubuntu-advantage-tools.postinst, depending on the situation. # # Because ubuntu-advantage-tools Depends on ubuntu-pro-client, # ubuntu-pro-client.postinst will always be executed before # ubuntu-advantage-tools.postinst. # # If the system already has ubuntu-pro-client and is upgrading to a new version # of ubuntu-pro-client, that means all migrations present in # ubuntu-advantage-tools.postinst must have already run at the time the system # upgraded to the renamed ubuntu-pro-client. That means the migrations in this # file can and should execute as part of ubuntu-pro-client.postinst. # # If upgrading from before the rename to the current version (from before # version 31), then not necessarily all migrations inside of # ubuntu-advantage-tools.postinst will have already run. Because the migrations # present in this file may depend on those previous migrations, then this file # must execute at the end of ubuntu-advantage-tools.postinst. # # In practice, this file is executed conditionally in either # ubuntu-pro-client.postinst or ubuntu-advantage-tools.postinst using version # checks. If we're upgrading from a version earlier than 31, then this executes # in ubuntu-advantage-tools.postinst. If we're upgrading from version 31 or # later, then this executes in ubuntu-pro-client.postinst. # # # # Migrations should always be version-gated using PREVIOUS_PKG_VER and execute # in order from oldest to newest. # # For example: # if dpkg --compare-versions "$PREVIOUS_PKG_VER" lt "33~"; then # # do the migrations to version 33 # fi # if dpkg --compare-versions "$PREVIOUS_PKG_VER" lt "34~"; then # # do the migrations to version 34 # fi # set -e PREVIOUS_PKG_VER=$1 if dpkg --compare-versions "$PREVIOUS_PKG_VER" lt "32~"; then # When we perform the write operation through # UserConfigFile we write the public # version of the user-config file with all the # sensitive data removed. # We also move the user-config.json file to the private # directory source_file="/var/lib/ubuntu-advantage/user-config.json" destination_dir="/var/lib/ubuntu-advantage/private" # Check if the source file exists if [ -f "$source_file" ]; then mkdir -p "$destination_dir" # Move the user-config.json file to the private directory mv "$source_file" "$destination_dir/user-config.json" /usr/bin/python3 -c " from uaclient.files import UserConfigFileObject try: user_config_file = UserConfigFileObject() content = user_config_file.read() user_config_file.write(content) except Exception as e: print('Error while creating public user-config file: {}'.format(e)) " fi fi if dpkg --compare-versions "$PREVIOUS_PKG_VER" lt "35~"; then # Create an only series marker file only if # the machine-token.json file exists # This is to ensure that the only-series # contract check runs correctly if [ -f "/var/lib/ubuntu-advantage/private/machine-token.json" ]; then touch "/var/lib/ubuntu-advantage/marker-only-series-check" fi # For attached machines, we need to ensure that the apt auth configuration # is updated to include the snapshot urls for esm-infra and esm-apps if [ -f "/var/lib/ubuntu-advantage/private/machine-token.json" ]; then /usr/bin/python3 /usr/lib/ubuntu-advantage/add_esm_snapshot_auth.py fi fi
Close