preinst is in libreoffice-common 1:3.5.2-2ubuntu1.
This file is a maintainer script. It is executed when installing (*inst) or removing (*rm) the package.
The actual contents of the file can be viewed below.
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 80 | #!/bin/sh
set -e
case "$1" in install|upgrade)
# move a already-filled in javasettingsunopkginstall.xml to the new
# location on upgrades
if [ ! -e `echo /usr/lib/libreoffice | sed -e s/usr/var/`/share/config/javasettingsunopkginstall.xml ]; then
if [ ! -d `echo /usr/lib/libreoffice | sed -e s/usr/var/`/share/config ]; then
mkdir -p `echo /usr/lib/libreoffice | sed -e s/usr/var/`/share/config
fi
if [ -e `echo /usr/lib/libreoffice | sed -e s/usr/var/ | sed -e s/libre/open/`/config/javasettingsunopkginstall.xml ]; then
mv `echo /usr/lib/libreoffice | sed -e s/usr/var/ | sed -e s/libre/open/`/share/config/javasettingsunopkginstall.xml \
`echo /usr/lib/libreoffice | sed -e s/usr/var/`/share/config/javasettingsunopkginstall.xml
fi
fi
dpkg-maintscript-helper rm_conffile "/etc/bash_completion.d/ooffice.sh" 1:3.3.0~rc4-2 libreoffice-common -- "$@"
if [ -n "$2" ] && dpkg --compare-versions "$2" lt "1:3.3.0-3"; then
if [ -d /share ]; then
rm -f /share/config/javasettingsunopkginstall.xml
rmdir /share/config 2> /dev/null && rmdir /share 2> /dev/null || true
fi
if [ -d /user ]; then
for i in shared tmp; do
rmdir /user/extensions/$i/extensions 2> /dev/null || true
rm -f /user/extensions/$i/extensions.db
rm -f /user/extensions/$i/lastsynchronized
rm -f /user/extensions/$i/log.txt
rmdir /user/extensions/$i/registry/com.sun.star.comp.deployment.bundle.PackageRegistryBackend 2> /dev/null || true
rmdir /user/extensions/$i/registry/com.sun.star.comp.deployment.component.PackageRegistryBackend 2> /dev/null || true
rm -f /user/extensions/$i/registry/com.sun.star.comp.deployment.configuration.PackageRegistryBackend/backenddb.xml || true
rm -f /user/extensions/$i/registry/com.sun.star.comp.deployment.configuration.PackageRegistryBackend/registered_packages.db || true
rmdir /user/extensions/$i/registry/com.sun.star.comp.deployment.configuration.PackageRegistryBackend 2> /dev/null || true
rmdir /user/extensions/$i/registry/com.sun.star.comp.deployment.executable.PackageRegistryBackend 2> /dev/null || true
rm -f /user/extensions/$i/registry/com.sun.star.comp.deployment.help.PackageRegistryBackend/backenddb.xml || true
rmdir /user/extensions/$i/registry/com.sun.star.comp.deployment.help.PackageRegistryBackend 2> /dev/null || true
rmdir /user/extensions/$i/registry/com.sun.star.comp.deployment.script.PackageRegistryBackend 2> /dev/null || true
rmdir /user/extensions/$i/registry/com.sun.star.comp.deployment.sfwk.PackageRegistryBackend 2> /dev/null || true
rmdir /user/extensions/$i/registry 2> /dev/null && rmdir /user/extensions/$i 2> /dev/null || true
done
rmdir /user/extensions/ 2> /dev/null && rmdir /user 2> /dev/null || true
rm -f /user/uno_packages/cache/log.txt
rmdir /user/uno_packages/cache/registry/com.sun.star.comp.deployment.bundle.PackageRegistryBackend 2> /dev/null || true
rmdir /user/uno_packages/cache/registry/com.sun.star.comp.deployment.component.PackageRegistryBackend 2> /dev/null || true
rm -f /user/uno_packages/cache/registry/com.sun.star.comp.deployment.configuration.PackageRegistryBackend/backenddb.xml || true
rm -f /user/uno_packages/cache/registry/com.sun.star.comp.deployment.configuration.PackageRegistryBackend/registered_packages.db || true
rmdir /user/uno_packages/cache/registry/com.sun.star.comp.deployment.configuration.PackageRegistryBackend 2> /dev/null || true
rmdir /user/uno_packages/cache/registry/com.sun.star.comp.deployment.configuration.PackageRegistryBackend 2> /dev/null || true
rmdir /user/uno_packages/cache/registry/com.sun.star.comp.deployment.executable.PackageRegistryBackend 2> /dev/null || true
rm -f /user/uno_packages/cache/registry/com.sun.star.comp.deployment.help.PackageRegistryBackend/backenddb.xml || true
rmdir /user/uno_packages/cache/registry/com.sun.star.comp.deployment.help.PackageRegistryBackend 2> /dev/null || true
rmdir /user/uno_packages/cache/registry/com.sun.star.comp.deployment.script.PackageRegistryBackend 2> /dev/null || true
rmdir /user/uno_packages/cache/registry/com.sun.star.comp.deployment.sfwk.PackageRegistryBackend 2> /dev/null || true
rmdir /user/uno_packages/cache/uno_packages 2> /dev/null || true
rm -f /user/uno_packages/cache/uno_packages.db 2> /dev/null || true
rmdir /user/uno_packages/cache/registry 2> /dev/null && rmdir /user/uno_packages/cache 2> /dev/null && rmdir /user/uno_packages 2> /dev/null || true
rmdir /user 2> /dev/null || true
fi
fi
dpkg-maintscript-helper mv_conffile \
"/etc/openoffice/psprint.conf" "/etc/libreoffice/psprint.conf" "" libreoffice-common -- "$@"
dpkg-maintscript-helper mv_conffile \
"/etc/openoffice/sofficerc" "/etc/libreoffice/sofficerc" "" libreoffice-common -- "$@"
dpkg-maintscript-helper mv_conffile \
"/etc/openoffice/soffice.sh" "/etc/libreoffice/soffice.sh" "" libreoffice-common -- "$@"
;;
esac
exit 0
|