Remove the pkg-deinstall script forgotten during r419364
Pointyhat: bapt PR: 210313
This commit is contained in:
parent
b43d73fda5
commit
12e5cb6b96
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=420669
@ -3,7 +3,7 @@
|
||||
|
||||
PORTNAME= javavmwrapper
|
||||
PORTVERSION= 2.5
|
||||
PORTREVISION= 1
|
||||
PORTREVISION= 2
|
||||
CATEGORIES= java
|
||||
MASTER_SITES= # none
|
||||
DISTFILES= # none
|
||||
|
@ -1,54 +0,0 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# $FreeBSD$
|
||||
|
||||
export PATH=/bin:/sbin:/usr/bin:/usr/sbin
|
||||
|
||||
# Run this script at the pre-deinstall stage
|
||||
if [ "x${2}" != "xDEINSTALL" ]; then
|
||||
exit 0
|
||||
fi
|
||||
|
||||
# The option configuration file
|
||||
OPTION_CONF="${PKG_PREFIX}/etc/javavm_opts.conf"
|
||||
|
||||
# Remove the option configuration file if its identical to the
|
||||
# distributed version.
|
||||
if [ -f "${OPTION_CONF}" -a -f "${OPTION_CONF}.dist" ]; then
|
||||
if [ `sed -e '/^#/d' -e '/^\s*$/d' "${OPTION_CONF}" | sort | md5` = \
|
||||
`sed -e '/^#/d' -e '/^\s*$/d' "${OPTION_CONF}.dist" | sort | md5` ]; then
|
||||
rm -f "${OPTION_CONF}"
|
||||
fi
|
||||
fi
|
||||
|
||||
# Destroy the symbolic links that were created for every executable for a VM.
|
||||
_excl_links='checkvms manvm registervm unregistervm'
|
||||
_find_expr='-depth 1 -type l'
|
||||
for i in ${_excl_links}; do
|
||||
_find_expr="${_find_expr} ! -name ${i}"
|
||||
done
|
||||
_javavm_path=`realpath ${PKG_PREFIX}/bin/javavm`
|
||||
for i in `find ${PKG_PREFIX}/bin ${_find_expr}`; do
|
||||
if [ "${_javavm_path}" = `realpath ${i}` ]; then
|
||||
rm -f "${i}"
|
||||
fi
|
||||
done
|
||||
|
||||
# The configuration file
|
||||
CONF="${PKG_PREFIX}/etc/javavms"
|
||||
|
||||
# Ensure the configuration file exists
|
||||
if [ ! -f "${CONF}" ]; then
|
||||
exit 0
|
||||
fi
|
||||
|
||||
# Ensure the configuration file has the correct permissions
|
||||
if [ ! -r "${CONF}" ]; then
|
||||
echo "error: can't read configuration file ${CONF}" 1>&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Remove the configuration file.
|
||||
rm -f "${CONF}"
|
||||
|
||||
exit 0
|
Loading…
Reference in New Issue
Block a user