CasperSecurity

Current Path : /var/lib/dpkg/info/
Upload File :
Current File : /var/lib/dpkg/info/openjdk-11-jdk-headless:amd64.postinst

#!/bin/sh

set -e

multiarch=x86_64-linux-gnu
priority=1111
basedir=/usr/lib/jvm/java-11-openjdk-amd64
mandir=$basedir/man
jdiralias=java-1.11.0-openjdk-amd64
srcext=1.gz
dstext=1.gz
jdk_hl_tools='jar jarsigner javac javadoc javap jcmd jdb jdeprscan jdeps jfr jimage jinfo jlink jmap jmod jps jrunscript jshell jstack jstat jstatd rmic serialver jaotc jhsdb'

case "$1" in
configure)
    # obsolete tool
    if update-alternatives --list apt 2>/dev/null; then
	update-alternatives --remove-all apt || true
    fi

    if [ -z "$2" ]; then
	update_alternatives=y
    fi
    if [ -n "$multiarch" ] && [ -n "$2" ]; then
	for i in $jdk_hl_tools; do
	    if [ -z "$(update-alternatives --list $i 2>/dev/null | grep ^$basedir/)" ]; then
		update_alternatives=y
		break
	    fi
	done
    fi
    if [ "$update_alternatives" != y ] && [ $priority -gt 1060 ]; then
	for i in $jre_tools; do
	    oldp=$(update-alternatives --query java | awk -v b=$basedir '/^Alternative:/ && $2~b {p=1} /^Priority:/ && p {print $2; exit}')
	    if [ -n "$oldp" ] && [ "$oldp" -le 1060 ]; then
		update_alternatives=y
		break
	    fi
	done
    fi

    if [ "$update_alternatives" = y ]; then
    if [ -n "$multiarch" ] && [ "$DPKG_MAINTSCRIPT_ARCH" != $(dpkg --print-architecture) ]; then
	priority=$(expr $priority - 1)
    fi
    for i in $jdk_hl_tools; do
	unset slave1 slave2 || true
        if [ -e $mandir/man1/$i.$srcext ]; then
	    slave1="--slave \
		/usr/share/man/man1/$i.$dstext \
                $i.$dstext \
                $mandir/man1/$i.$srcext"
	fi
        if false && [ -e $mandir/ja/man1/$i.$srcext ]; then
	    slave2="--slave \
		/usr/share/man/ja/man1/$i.$dstext \
                ${i}_ja.$dstext \
                $mandir/ja/man1/$i.$srcext"
	fi
        update-alternatives \
            --install \
            /usr/bin/$i \
            $i \
            $basedir/bin/$i \
            $priority \
	    $slave1 $slave2
    done
    fi # update alternatives

    ;;
esac



exit 0
Hacker Blog, Shell İndir, Sql İnjection, XSS Attacks, LFI Attacks, Social Hacking, Exploit Bot, Proxy Tools, Web Shell, PHP Shell, Alfa Shell İndir, Hacking Training Set, DDoS Script, Denial Of Service, Botnet, RFI Attacks, Encryption
Telegram @BIBIL_0DAY