Dre4m Shell
Server IP : 85.214.239.14  /  Your IP : 3.136.234.195
Web Server : Apache/2.4.62 (Debian)
System : Linux h2886529.stratoserver.net 4.9.0 #1 SMP Tue Jan 9 19:45:01 MSK 2024 x86_64
User : www-data ( 33)
PHP Version : 7.4.18
Disable Function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,pcntl_unshare,
MySQL : OFF  |  cURL : OFF  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : ON  |  Pkexec : OFF
Directory :  /proc/2/root/proc/2/cwd/proc/3/root/var/lib/dpkg/info/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ HOME SHELL ]     

Current File : /proc/2/root/proc/2/cwd/proc/3/root/var/lib/dpkg/info/mysql-apt-config.config
#!/bin/bash

# Copyright (c) 2014, 2023, Oracle and/or its affiliates. All rights reserved.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; version 2 of the License.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301 USA

. /usr/share/debconf/confmodule

if [ "$1" = "configure" ] || [ "$1" = "reconfigure" ];
then
	db_get mysql-apt-config/repo-distro && DISTRO=${RET}
	db_get mysql-apt-config/repo-codename && DISTRO_VERSION=${RET}
	if [ -z "${DISTRO}" ]; then
		DISTRO=$(lsb_release -is | tr 'A-Z' 'a-z')
	fi
	if [ -z "${DISTRO_VERSION}" ]; then
		DISTRO_VERSION=$(lsb_release -cs)
	fi
	db_get mysql-apt-config/repo-url && REPO_URL_BASE=${RET}
	db_get mysql-apt-config/select-tools && DEFAULT_TOOLS=${RET}
	db_get mysql-apt-config/select-preview && DEFAULT_PREVIEW=${RET}
	db_get mysql-apt-config/select-server && DEFAULT_VERSION=${RET}

	# If server version was not previously selected,
        # and mysql-server is already installed, we pick the closest available version as the default
	if [ -z "${DEFAULT_VERSION}" ];
	then
		INSTALLED_SERVER=$(dpkg -s mysql-server mysql-community-server mysql-commercial-server 2> /dev/null | grep Version: | cut -d' ' -f2 | cut -d. -f-2| tail -n1)
		if [ "${INSTALLED_SERVER}" = "8.0" ];
		then
			INSTALLED_VERSION="MySQL Server 8.0"
			DEFAULT_VERSION="mysql-8.0"
		elif [ "${INSTALLED_SERVER}" = "8.1" ];
		then
			INSTALLED_VERSION="MySQL Server 8.1"
			DEFAULT_VERSION="mysql-innovation"
		elif [ "${INSTALLED_SERVER}" = "5.7" ];
		then
			INSTALLED_VERSION="MySQL Server 5.7"
			DEFAULT_VERSION="mysql-5.7"
		elif [ "${INSTALLED_SERVER}" = "7.5" ];
		then
			INSTALLED_VERSION="MySQL Cluster 7.5"
			DEFAULT_VERSION="mysql-cluster-7.5"
		elif [ "${INSTALLED_SERVER}" = "7.6" ];
		then
			INSTALLED_VERSION="MySQL Cluster 7.6"
			DEFAULT_VERSION="mysql-cluster-7.6"
		else
			INSTALLED_VERSION="no MySQL Server"
			DEFAULT_VERSION="mysql-8.0"
		fi
	else
		INSTALLED_VERSION="${DEFAULT_VERSION}"
	fi
	
	if [ "${DEBIAN_FRONTEND}" = "noninteractive" ];
	then
		if [ ! -z "${MYSQL_REPO_URL}" ];
		then
			REPO_URL_BASE=${MYSQL_REPO_URL}	
		fi
		if [ ! -z "${MYSQL_SERVER_VERSION}" ];
		then
			DEFAULT_VERSION=${MYSQL_SERVER_VERSION}
		fi
		if [ ! -z "${MYSQL_TOOLS}" ];
		then
			DEFAULT_TOOLS=${MYSQL_TOOLS}
		else
			DEFAULT_TOOLS="mysql-tools"
		fi
		db_set mysql-apt-config/repo-distro ${DISTRO}
		db_set mysql-apt-config/repo-codename ${DISTRO_VERSION}
		db_set mysql-apt-config/select-server ${DEFAULT_VERSION}
		db_set mysql-apt-config/tools-component ${DEFAULT_TOOLS}
		db_set mysql-apt-config/preview-component ${NULL}
		db_set mysql-apt-config/repo-url ${REPO_URL_BASE}
		exit 0
	fi

	set -e

	SUPPORTED_DISTROS="ubuntulunar ubuntufocal ubuntujammy ubuntumantic debianbullseye debianbookworm"
	db_set mysql-apt-config/repo-distro ${DISTRO}
	db_set mysql-apt-config/repo-codename ${DISTRO_VERSION}
	db_go
	if [[ ! ${SUPPORTED_DISTROS} =~ (^| )${DISTRO}${DISTRO_VERSION}($| ) ]];
	then
		db_subst mysql-apt-config/unsupported-platform platform "${DISTRO} ${DISTRO_VERSION}"
		db_input high mysql-apt-config/unsupported-platform || true
		db_go
		db_get mysql-apt-config/unsupported-platform && UNSUPPORTED_RESPONSE=${RET}
		if [ "${UNSUPPORTED_RESPONSE}" = "abort" ];
		then
			exit 0 # Skip the rest
		else
			DISTRO=$(echo $UNSUPPORTED_RESPONSE | cut -d' ' -f1)
			DISTRO_VERSION=$(echo $UNSUPPORTED_RESPONSE | cut -d' ' -f2)
			db_set mysql-apt-config/repo-distro ${DISTRO}
			db_set mysql-apt-config/repo-codename ${DISTRO_VERSION}
			db_go
		fi
	fi

	case ${DISTRO_VERSION} in
		focal)
			SERVER_VERSIONS="mysql-8.0, mysql-cluster-8.0"
		        ;;
		lunar)
                        SERVER_VERSIONS="mysql-8.0, mysql-innovation, mysql-cluster-8.0, mysql-cluster-innovation"
                        ;;
		jammy)
			SERVER_VERSIONS="mysql-8.0, mysql-innovation, mysql-cluster-8.0, mysql-cluster-innovation"
			;;
                bullseye)
                        SERVER_VERSIONS="mysql-8.0, mysql-innovation, mysql-cluster-8.0, mysql-cluster-innovation"
                        ;;
                bookworm)
                        SERVER_VERSIONS="mysql-8.0, mysql-innovation, mysql-cluster-8.0, mysql-cluster-innovation"
                        ;;
                mantic)
                        SERVER_VERSIONS="mysql-8.0, mysql-innovation, mysql-cluster-8.0, mysql-cluster-innovation"
                        ;;
		*)
			SERVER_VERSIONS=""
			;;
	esac
	db_subst mysql-apt-config/select-server server_versions ${SERVER_VERSIONS}
	db_set mysql-apt-config/select-server ${DEFAULT_VERSION}
	db_set mysql-apt-config/select-tools ${DEFAULT_TOOLS}
	db_set mysql-apt-config/select-preview ${DEFAULT_PREVIEW}
	db_fset mysql-apt-config/select-product   seen false
	db_fset mysql-apt-config/select-server    seen false
	db_fset mysql-apt-config/select-tools    seen false
	db_fset mysql-apt-config/select-preview    seen false

	
	db_subst mysql-apt-config/select-server installed_server ${INSTALLED_VERSION}
	db_subst mysql-apt-config/select-product selected_server ${DEFAULT_VERSION}
	db_subst mysql-apt-config/select-product selected_tools ${DEFAULT_TOOLS}
	db_subst mysql-apt-config/select-product selected_preview ${DEFAULT_PREVIEW}
	SELECT_PRODUCT=${NULL}
	while [ "${SELECT_PRODUCT}" != "Ok" ]
	do
		if [[ "${SELECT_PRODUCT}" =~ "Server & Cluster" ]];
		then
			db_input high mysql-apt-config/select-server || true
			db_go
		elif [[ "${SELECT_PRODUCT}" =~ "Tools & Connectors" ]];
		then
			db_input high mysql-apt-config/select-tools || true
			db_go
		elif [[ "${SELECT_PRODUCT}" =~ "Preview Packages" ]];
		then
			db_input high mysql-apt-config/select-preview || true
			db_go
		fi
		SELECT_PRODUCT=${NULL}
		db_set mysql-apt-config/select-product ""

		db_get mysql-apt-config/select-tools && TOOLS_ENABLED=${RET}
		db_get mysql-apt-config/select-server && SERVER_SELECTED=${RET}
		db_get mysql-apt-config/select-preview && PREVIEW_ENABLED=${RET}
		db_subst mysql-apt-config/select-product selected_server ${SERVER_SELECTED}
		db_subst mysql-apt-config/select-product selected_tools ${TOOLS_ENABLED}
		db_subst mysql-apt-config/select-product selected_preview ${PREVIEW_ENABLED}
		db_input high mysql-apt-config/select-product || true
		db_go

		db_get mysql-apt-config/select-product && SELECT_PRODUCT=${RET}
		if [ -z "${SELECT_PRODUCT}" ]; #TODO Is this even possible?
		then
			break;
		fi
	done

	db_get mysql-apt-config/select-tools && TOOLS_ENABLED=${RET}
	if [ "${TOOLS_ENABLED}" = "Enabled" ];
	then
		db_set mysql-apt-config/tools-component "mysql-tools"
	else
		db_set mysql-apt-config/tools-component ${NULL}
	fi
	if [ "${PREVIEW_ENABLED}" = "Enabled" ];
	then
		db_set mysql-apt-config/preview-component "mysql-tools-preview"
	else
		db_set mysql-apt-config/preview-component ${NULL}
	fi
	if [ "${SERVER_SELECTED}" = "None" ];
	then
		db_set mysql-apt-config/select-server ${NULL}
	fi
	if [ -z "${SELECT_PRODUCT}" ];
	then
		db_set mysql-apt-config/select-server ${NULL}
	fi
	set +e

fi

Anon7 - 2022
AnonSec Team