summaryrefslogtreecommitdiff
path: root/debian/JB-jre-headless.prerm.in
diff options
context:
space:
mode:
Diffstat (limited to 'debian/JB-jre-headless.prerm.in')
-rw-r--r--debian/JB-jre-headless.prerm.in27
1 files changed, 27 insertions, 0 deletions
diff --git a/debian/JB-jre-headless.prerm.in b/debian/JB-jre-headless.prerm.in
new file mode 100644
index 0000000..d8e24ce
--- /dev/null
+++ b/debian/JB-jre-headless.prerm.in
@@ -0,0 +1,27 @@
+#!/bin/sh
+
+set -e
+
+basedir=/@basedir@
+jre_tools='@jre_hl_tools@'
+
+rm -f $basedir/jre/lib/@archdir@/client/classes.jsa
+rm -f $basedir/jre/lib/@archdir@/server/classes.jsa
+
+if [ "$1" = "remove" ] || [ "$1" = "deconfigure" ]; then
+ for i in $jre_tools; do
+ update-alternatives --remove $i $basedir/jre/bin/$i
+ done
+
+ if which update-binfmts >/dev/null; then
+ # try to remove and ignore the error
+ if [ -e /var/lib/binfmts/@basename@ ]; then
+ update-binfmts --package @basename@ \
+ --remove jar /usr/bin/jexec || true
+ fi
+ fi
+
+ update-alternatives --remove jexec $basedir/jre/lib/jexec
+fi
+
+#DEBHELPER#