Linux ip-172-26-7-228 5.4.0-1103-aws #111~18.04.1-Ubuntu SMP Tue May 23 20:04:10 UTC 2023 x86_64
Apache
: 172.26.7.228 | : 18.116.63.107
Cant Read [ /etc/named.conf ]
5.6.40-24+ubuntu18.04.1+deb.sury.org+1
www-data
Terminal
AUTO ROOT
Adminer
Backdoor Destroyer
Linux Exploit
Lock Shell
Lock File
Create User
CREATE RDP
PHP Mailer
BACKCONNECT
HASH IDENTIFIER
README
+ Create Folder
+ Create File
/
usr /
lib /
ubuntu-advantage /
[ HOME SHELL ]
Name
Size
Permission
Action
apt-esm-json-hook
50.16
KB
-rwxr-xr-x
apt_news.py
565
B
-rw-r--r--
auto_attach.py
3.03
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.48
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
2.85
KB
-rwxr-xr-x
reboot_cmds.py
3.97
KB
-rw-r--r--
timer.py
6.38
KB
-rw-r--r--
upgrade_lts_contract.py
742
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
Close