preinst is in icedtea-netx 1.6.2-3.1ubuntu3.
This file is a maintainer script. It is executed when installing (*inst) or removing (*rm) the package.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 | #!/bin/sh
set -e
multiarch=x86_64-linux-gnu
old_basedir=/usr/lib/jvm/java-6-openjdk
old_base7dir=/usr/lib/jvm/java-7-openjdk
tools='javaws itweb-settings'
case "$1" in
upgrade)
if [ -n "$multiarch" ] && [ -n "$2" ]; then
for i in $tools; do
if [ -n "$(update-alternatives --list $i 2>/dev/null | grep ^$old_basedir/)" ]; then
update-alternatives --remove $i $old_basedir/jre/bin/$i || true
fi
done
for i in $tools; do
if [ -n "$(update-alternatives --list $i 2>/dev/null | grep ^$old_base7dir/)" ]; then
update-alternatives --remove $i $old_base7dir/jre/bin/$i || true
fi
done
fi
;;
esac
exit 0
|