403Webshell
Server IP : 104.21.84.107  /  Your IP : 104.23.197.208
Web Server : Apache/2.4.63 (Ubuntu)
System : Linux adminpruebas-Virtual-Machine 6.14.0-37-generic #37-Ubuntu SMP PREEMPT_DYNAMIC Fri Nov 14 22:10:32 UTC 2025 x86_64
User : www-data ( 33)
PHP Version : 8.4.5
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : ON
Directory :  /var/lib/dpkg/info/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /var/lib/dpkg/info/libc6:amd64.postinst
#!/bin/sh
set -e

type=$1
preversion=$2

checkpkgver () {
    local status pkg
    pkg=$1
    status=$(dpkg -s $pkg 2>/dev/null | grep ^Status: | sed -e 's/^Status: \(.*\) \(.*\) \(.*\)/\3/g')
    if [ -n "$status" ] && [ "$status" != "not-installed" ] && [ "$status" != "config-files" ]; then
	echo $(dpkg -s $pkg 2>/dev/null | grep ^Version: | sed -e 's/^Version: *//');
    fi
}

if [ "$type" = configure ]
then
    # Load debconf module if available
    if [ -f /usr/share/debconf/confmodule ] ; then
	. /usr/share/debconf/confmodule
    fi

    # Only change LC_ALL after loading debconf to ensure the debconf templates
    # are properly localized.
    export LC_ALL=C

    if [ -n "$preversion" ] && [ -x "$(command -v ischroot)" ] && ! ischroot; then
	if dpkg --compare-versions "$preversion" lt 2.41; then
	    check=""
	    [ -f /var/run/services.need_restart ] && check=$(sort -u /var/run/services.need_restart 2>/dev/null)
	    # Change service names back into package names, so that we can
	    # double-check package installation.
	    check=$(echo "$check" | \
                    sed -e's/\batd\b/at/g' \
                        -e's/\bdovecot\b/dovecot-common/g' \
                        -e's/\bexim4\b/exim4-base/g' \
                        -e's/\blpd\b/lpr/g' \
                        -e's/\blpd-ppd\b/lpr-ppd/g' \
                        -e's/\bmysql\b/mysql-server/g' \
                        -e's/\bsaslauthd\b/sasl2-bin/g' \
                        -e's/\bsmbd\b/samba/g' \
                        -e's/\bpostgresql\b/postgresql-common/g' \
                    )

	    # Check to see which of the services that were running at unpack
	    # time are still around
            # the following substitution processes the check variable
            # and returns results in the services variable
	    # NSS services check:
	    	    echo -n "Checking for services that may need to be restarted..."
	    # Only get the ones that are installed, of the same architecture
	    # as libc (or arch all) and configured. Restart openssh-server even
	    # if only half-configured to continue accepting new connections
	    # during the upgrade.
	    [ -n "$check" ] && check=$(dpkg-query -W -f='${binary:Package} ${Status} ${Architecture}\n' $check 2> /dev/null | \
			grep -E "(^openssh-server .* unpacked|installed) (all|${DPKG_MAINTSCRIPT_ARCH})$" | sed 's/[: ].*//')
	    # some init scripts don't match the package names
	    check=$(echo $check | \
		    sed -e's/\bat\b/atd/g' \
			-e's/\bdovecot-common\b/dovecot/g' \
			-e's/\bexim4-base\b/exim4/g' \
			-e's/\blpr\b/lpd/g' \
			-e's/\blpr-ppd\b/lpd-ppd/g' \
			-e's/\bmysql-server\b/mysql/g' \
			-e's/\bopenssh-server\b/ssh/g' \
			-e's/\bsasl2-bin\b/saslauthd/g' \
			-e's/\bsamba\b/smbd/g' \
			-e's/\bpostgresql-common\b/postgresql/g' \
		    )
	    echo
	    echo "Checking init scripts..."
	    for service in $check; do
		invoke-rc.d ${service} status >/dev/null 2>/dev/null && status=0 || status=$?
		if [ "$status" = "0" ] || [ "$status" = "2" ] ; then
		    services="$service $services"
		elif [ "$status" = "100" ] ; then
		    echo "WARNING: init script for $service not found."
		fi
	    done

	    # If there are services that we *stopped* in the preinst, don't
	    # forget to restart them now
	    if [ -e /var/run/services.need_start ]; then
		services="$(sort -u /var/run/services.need_start) $services"
	    fi
	    if [ -n "$services" ]; then
		echo "Restarting services possibly affected by the upgrade:"
		failed=""
		for service in $services; do
		    case "$service" in
			gdm*)
			    idlopt="reload"
			    ;;
			*)
			    idlopt="restart"
			    ;;
		    esac
		    echo -n "  $service: restarting..."
		    if invoke-rc.d ${service} $idlopt > /dev/null 2>&1; then
			echo "done."
		    else
			echo "FAILED! ($?)"
			failed="$service $failed"
		    fi
		done
	
		echo
		if [ -n "$failed" ]; then
		    if [ -f /usr/share/debconf/confmodule ] ; then
			db_fset glibc/restart-failed seen false
			db_subst glibc/restart-failed services "$failed"
			if [ "$RELEASE_UPGRADE_MODE" = desktop ]; then
			    db_input medium glibc/restart-failed || true
			else
			    db_input critical glibc/restart-failed || true
			fi
			db_go || true
		    else
			echo "The following services failed to start: $failed"
			echo
			echo "You will need to start these manually by running \`invoke-rc.d <service> start'"
			echo "If the service still fails to start, you may need to file a bug on"
			echo "${DPKG_MAINTSCRIPT_PACKAGE}:${DPKG_MAINTSCRIPT_ARCH} or the service involved."
			frontend=`echo "$DEBIAN_FRONTEND" | tr '[:upper:]' '[:lower:]'`
			if [ "$frontend" != noninteractive ]; then
			    echo
			    echo -n "Press ENTER to continue: "
			    read foo
			fi
		    fi
		else
		    echo "Services restarted successfully."
		    rm -f /var/run/services.need_start /var/run/services.need_restart
		fi
	
		# Shut down the frontend, to make sure none of the
		# restarted services keep a connection open to it
		if [ -f /usr/share/debconf/confmodule ] ; then
		    db_stop
		fi
	    else
		echo "Nothing to restart."
	    fi
	fi # end upgrading and $preversion lt 2.41
	# give a reboot notification on al upgrades (LP: #1546457)
	if [ -x /usr/share/update-notifier/notify-reboot-required ]; then
	    /usr/share/update-notifier/notify-reboot-required
	fi
    fi # Upgrading

    # Emit triggers to allow depending packages to restart themselves if
    # needed.  The triggers are called with "--no-await", as packages with the
    # triggers-awaited state do not satisfy dependencies.
    dpkg-trigger --no-await libc-upgrade
    if [ -n "$preversion" ] && dpkg --compare-versions "$preversion" lt 2.41; then
        dpkg-trigger --no-await libc-major-upgrade
    fi
fi



exit 0

Youez - 2016 - github.com/yon3zu
LinuXploit