El botón de desinstalación ejecuta el siguiente script, ubicado en
/Library/Filesystems/fusefs_txantfs.fs/Contents/Resources/Support/uninstall-package.sh
#!/bin/bash
if [ "$0" != "/bin/uninstall-for-real" ]; then
echo "Reexecuting script from memory."
/bin/bash -c "'cat \"$0\"'" "/bin/uninstall-for-real" "$@"; exit $?
else
echo "In-memory execution active."
fi
DRIVERNAME="Tuxera NTFS"
PACKAGENAME="TuxeraNTFS"
PACKAGENAME_COMPAT="TuxeraNTFS_compat"
PACKAGEID="com.tuxera.pkg.Tuxera_NTFS"
PACKAGEID_COMPAT="com.tuxera.pkg.Tuxera_NTFS_compat"
FSBUNDLENAME="fusefs_txantfs"
FSBUNDLEDIR="/Library/Filesystems/${FSBUNDLENAME}.fs"
COMPAT_FSBUNDLEDIR="/System/Library/Filesystems/${FSBUNDLENAME}.fs"
PREFPANEDIR="/Library/PreferencePanes/${DRIVERNAME}.prefPane"
STARTUPITEMDIR="/Library/StartupItems/${PACKAGENAME}UnmountHelper"
DISK_MANAGER_DIR="/Applications/Tuxera Disk Manager.app"
OLD_STYLE_RECEIPT_BUNDLE_PATH="/Library/Receipts/${PACKAGENAME}.pkg"
OLD_STYLE_RECEIPT_PATH="${OLD_STYLE_RECEIPT_BUNDLE_PATH}/Contents/Archive.bom"
OLD_STYLE_COMPAT_RECEIPT_BUNDLE_PATH="/Library/Receipts/${PACKAGENAME_COMPAT}.pkg"
OLD_STYLE_COMPAT_RECEIPT_PATH="${OLD_STYLE_COMPAT_RECEIPT_BUNDLE_PATH}/Contents/Archive.bom"
NEW_STYLE_RECEIPT_PATH="/var/db/receipts/${PACKAGEID}.bom"
NEW_STYLE_RECEIPT_PLIST_PATH="/var/db/receipts/${PACKAGEID}.plist"
NEW_STYLE_COMPAT_RECEIPT_PATH="/var/db/receipts/${PACKAGEID_COMPAT}.bom"
NEW_STYLE_COMPAT_RECEIPT_PLIST_PATH="/var/db/receipts/${PACKAGEID_COMPAT}.plist"
APPLICATION_SUPPORT_DIR_PATH="/Library/Application Support/Tuxera NTFS"
BACKUP_RECEIPT_PATH="${APPLICATION_SUPPORT_DIR_PATH}/Receipt.bom"
BACKUP_COMPAT_RECEIPT_PATH="${APPLICATION_SUPPORT_DIR_PATH}/Receipt_compat.bom"
error() {
echo "There were errors... aborting."
exit 1
}
checkForErrors() {
_ERRVAL=$1
if [ ! "${_ERRVAL}" -eq 0 ]; then error; fi
}
EFFECTIVE_UID=${EUID} #'id -u'
if [ ${EFFECTIVE_UID} -ne 0 ]; then
echo "ERROR: Not running as root! (UID: ${UID} EUID: ${EUID})"
exit 100
fi
if [ -f "${NEW_STYLE_RECEIPT_PATH}" ]; then
RECEIPT="${NEW_STYLE_RECEIPT_PATH}"
elif [ -f "${OLD_STYLE_RECEIPT_PATH}" ]; then
RECEIPT="${OLD_STYLE_RECEIPT_PATH}"
elif [ -f "${BACKUP_RECEIPT_PATH}" ]; then
RECEIPT="${BACKUP_RECEIPT_PATH}"
else
echo "None of the possible receipt paths were found... aborting."
exit 101
fi
if [ -f "${NEW_STYLE_COMPAT_RECEIPT_PATH}" ]; then
COMPAT_RECEIPT="${NEW_STYLE_COMPAT_RECEIPT_PATH}"
elif [ -f "${OLD_STYLE_COMPAT_RECEIPT_PATH}" ]; then
COMPAT_RECEIPT="${OLD_STYLE_COMPAT_RECEIPT_PATH}"
elif [ -f "${BACKUP_COMPAT_RECEIPT_PATH}" ]; then
COMPAT_RECEIPT="${BACKUP_COMPAT_RECEIPT_PATH}"
else
COMPAT_RECEIPT=""
fi
# Store the list of files to delete in memory (so that we don't depend on
# reading from files that we may delete during the process).
FILES_TO_DELETE="$(sh -c "lsbom -fls \"${RECEIPT}\" | colrm 1 1 | sed \"s/^/\\"/\" | sed \"s/$/\\"/\"")"
if [ ! -z "${COMPAT_RECEIPT}" ]; then
FILES_TO_DELETE="${FILES_TO_DELETE} $(sh -c "lsbom -fls \"${COMPAT_RECEIPT}\" | colrm 1 1 | sed \"s/^/\\"/\" | sed \"s/$/\\"/\"")"
fi
# Remove all uchg attributes from installed files. If present, this attribute
# will cause deletion of installed files to fail.
# (No need to check exit value from chflags since we want to attempt deletion
# anyway if chflags fails.)
chflags -R nouchg "${FSBUNDLEDIR}"
if [ -d "${COMPAT_FSBUNDLEDIR}" ]; then
chflags -R nouchg "${COMPAT_FSBUNDLEDIR}"
fi
chflags -R nouchg "${PREFPANEDIR}"
chflags -R nouchg "${STARTUPITEMDIR}"
chflags -R nouchg "${DISK_MANAGER_DIR}"
sh -c "echo '${FILES_TO_DELETE}' | xargs chflags -R nouchg"
if [ -d "${OLD_STYLE_RECEIPT_BUNDLE_PATH}" ]; then
chflags -R nouchg "${OLD_STYLE_RECEIPT_BUNDLE_PATH}"
fi
if [ -d "${OLD_STYLE_COMPAT_RECEIPT_BUNDLE_PATH}" ]; then
chflags -R nouchg "${OLD_STYLE_COMPAT_RECEIPT_BUNDLE_PATH}"
fi
if [ -f "${NEW_STYLE_RECEIPT_PATH}" ]; then
chflags nouchg "${NEW_STYLE_RECEIPT_PATH}"
fi
if [ -f "${NEW_STYLE_RECEIPT_PLIST_PATH}" ]; then
chflags nouchg "${NEW_STYLE_RECEIPT_PLIST_PATH}"
fi
if [ -f "${NEW_STYLE_COMPAT_RECEIPT_PATH}" ]; then
chflags nouchg "${NEW_STYLE_COMPAT_RECEIPT_PATH}"
fi
if [ -f "${NEW_STYLE_COMPAT_RECEIPT_PLIST_PATH}" ]; then
chflags nouchg "${NEW_STYLE_COMPAT_RECEIPT_PLIST_PATH}"
fi
if [ -d "${APPLICATION_SUPPORT_DIR_PATH}" ]; then
# Backup receipt resides in this directory, so we must do this in the right
# order.
chflags nouchg "${APPLICATION_SUPPORT_DIR_PATH}"
fi
if [ -f "${BACKUP_RECEIPT_PATH}" ]; then
chflags nouchg "${BACKUP_RECEIPT_PATH}"
fi
if [ -f "${BACKUP_COMPAT_RECEIPT_PATH}" ]; then
chflags nouchg "${BACKUP_COMPAT_RECEIPT_PATH}"
fi
# Remove installed files.
echo "Removing package files..."
sh -c "echo '${FILES_TO_DELETE}' | xargs rm -fv"
checkForErrors $?
if [ -d "${FSBUNDLEDIR}" ]; then
echo "Removing file system bundle directory..."
rm -rfv "${FSBUNDLEDIR}"
checkForErrors $?
fi
if [ -d "${COMPAT_FSBUNDLEDIR}" ]; then
echo "Removing compatibility file system bundle directory..."
rm -rfv "${COMPAT_FSBUNDLEDIR}"
checkForErrors $?
fi
if [ -d "${PREFPANEDIR}" ]; then
echo "Removing ${DRIVERNAME} preference pane directory..."
rm -rfv "${PREFPANEDIR}"
checkForErrors $?
fi
if [ -d "${STARTUPITEMDIR}" ]; then
echo "Removing ${DRIVERNAME} startup item directory..."
rm -rfv "${STARTUPITEMDIR}"
checkForErrors $?
fi
if [ -d "${DISK_MANAGER_DIR}" ]; then
echo "Removing ${DRIVERNAME} Tuxera Disk Manager directory..."
rm -rfv "${DISK_MANAGER_DIR}"
checkForErrors $?
fi
# Remove all package receipt files.
if [ -d "${OLD_STYLE_RECEIPT_BUNDLE_PATH}" ]; then
echo "Removing package receipt..."
rm -rfv "${OLD_STYLE_RECEIPT_BUNDLE_PATH}"
checkForErrors $?
fi
if [ -d "${OLD_STYLE_COMPAT_RECEIPT_BUNDLE_PATH}" ]; then
echo "Removing compatibility package receipt..."
rm -rfv "${OLD_STYLE_COMPAT_RECEIPT_BUNDLE_PATH}"
checkForErrors $?
fi
if [ -f "${NEW_STYLE_RECEIPT_PATH}" ]; then
echo "Removing package receipt bom file..."
rm -fv "${NEW_STYLE_RECEIPT_PATH}"
checkForErrors $?
fi
if [ -f "${NEW_STYLE_RECEIPT_PLIST_PATH}" ]; then
echo "Removing package receipt plist file..."
rm -fv "${NEW_STYLE_RECEIPT_PLIST_PATH}"
checkForErrors $?
fi
if [ -f "${NEW_STYLE_COMPAT_RECEIPT_PATH}" ]; then
echo "Removing compatibility package receipt bom file..."
rm -fv "${NEW_STYLE_COMPAT_RECEIPT_PATH}"
checkForErrors $?
fi
if [ -f "${NEW_STYLE_COMPAT_RECEIPT_PLIST_PATH}" ]; then
echo "Removing compatibility package receipt plist file..."
rm -fv "${NEW_STYLE_COMPAT_RECEIPT_PLIST_PATH}"
checkForErrors $?
fi
if [ -f "${BACKUP_RECEIPT_PATH}" ]; then
echo "Removing backup receipt bom file..."
rm -fv "${BACKUP_RECEIPT_PATH}"
checkForErrors $?
fi
if [ -f "${BACKUP_COMPAT_RECEIPT_PATH}" ]; then
echo "Removing backup compatibility receipt bom file..."
rm -fv "${BACKUP_COMPAT_RECEIPT_PATH}"
checkForErrors $?
fi
if [ -d "${APPLICATION_SUPPORT_DIR_PATH}" ]; then
echo "Attempting to remove support dir..."
rmdir "${APPLICATION_SUPPORT_DIR_PATH}"
# This will fail if there are other files in there, but that's ok.
fi
echo "Done."
exit 0