diff options
Diffstat (limited to 'libre/java7-openjdk/jdk7-openjdk.install')
-rw-r--r-- | libre/java7-openjdk/jdk7-openjdk.install | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/libre/java7-openjdk/jdk7-openjdk.install b/libre/java7-openjdk/jdk7-openjdk.install new file mode 100644 index 000000000..8a985b606 --- /dev/null +++ b/libre/java7-openjdk/jdk7-openjdk.install @@ -0,0 +1,38 @@ +this_java='java-7-openjdk' + +post_install() { + default=$(/usr/bin/parabola-java get) + if [ -z "${default}" ]; then + /usr/bin/parabola-java set ${this_java} + elif [ "${default/\/jre}" = "${this_java/\/jre}" ]; then + /usr/bin/parabola-java fix + else + echo "Default Java environment is already set to '${default}'" + echo "To set '${this_java}' as default, consider using:" + echo " parabola-java set '${this_java}'" + fi + + if [ ! -f /etc/ssl/certs/java/cacerts ]; then + JAVA_HOME=/usr/lib/jvm/java-default-runtime /usr/bin/init-jks-keystore + fi +} + +post_upgrade() { + default=$(/usr/bin/parabola-java get) + if [ -z "${default}" ]; then + /usr/bin/parabola-java set ${this_java} + elif [ "${default/\/jre}" = "${this_java/\/jre}" ]; then + /usr/bin/parabola-java fix + fi + + if [ ! -f /etc/ssl/certs/java/cacerts ]; then + JAVA_HOME=/usr/lib/jvm/java-default-runtime /usr/bin/init-jks-keystore + fi +} + +pre_remove() { + default=$(/usr/bin/parabola-java get) + if [ "${default/\/jre}" = "${this_java/\/jre}" ]; then + /usr/bin/parabola-java set ${this_java}/jre + fi +} |