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 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79
|
#!/bin/sh
set -e
priority=@priority@
basedir=/@basedir@
basediralias=/@basediralias@
jdiralias=@jdiralias@
mandir=/@basedir@/jre/man
srcext=1.gz
dstext=1.gz
jre_tools='@jre_tools@'
jar_packs='@jre_packs@'
case "$1" in
configure)
[ -d /etc/.java ] || mkdir -m 755 /etc/.java
[ -d /etc/.java/.systemPrefs ] || mkdir -m 755 /etc/.java/.systemPrefs
if [ ! -f /etc/.java/.systemPrefs/.system.lock ]; then
touch /etc/.java/.systemPrefs/.system.lock
chmod 644 /etc/.java/.systemPrefs/.system.lock
fi
if [ ! -f /etc/.java/.systemPrefs/.systemRootModFile ]; then
touch /etc/.java/.systemPrefs/.systemRootModFile
chmod 644 /etc/.java/.systemPrefs/.systemRootModFile
fi
for i in $jar_packs; do
jar=$(echo $i | sed 's/\.pack$/.jar/')
$basedir/bin/unpack200 $basedir/$i $basedir/$jar
chmod 644 $basedir/$jar
done
for i in $jre_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
# disabled
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 \
$basediralias/jre/bin/$i \
$priority \
$slave1 $slave2
done
# activate class data sharing
case @archdir@ in i386|sparc)
rm -f $basedir/jre/lib/@archdir@/client/classes.jsa
$basedir/bin/java -client -Xshare:dump > /dev/null
esac
# respect the debconf choice not to grant the stopThread permission
#db_get @basename@-jre/stopthread
#if [ "$RET" = "false" ]; then
# POL=/etc/$jdiralias/security/java.policy
# mv $POL $POL.orig
# sed "s:\(\\tpermission java.lang.RuntimePermission \"stopThread\";\)://\\1:" < $POL.orig > $POL
# rm $POL.orig
#fi
;;
esac
#DEBHELPER#
exit 0
|