#!/bin/sh -e # # Debian pre install script # # Install of already installed package: # 1) Upgrade of package: # new-preinst upgrade old-version # *) new-postrm abort-upgrade old-version # 2) package had some configuration files from a previous version installed # new-preinst install old-version # *) new-postrm abort-install old-version # 3) Otherwise (i.e., the package was completely purged) # new-preinst install # *) new-postrm abort-install # set -e; PACKAGE=sendmail-doc; case "$1" in install) # DPKG doesn't overwrite directories with symlinks... if [ -d /usr/share/doc/$PACKAGE ]; then rm -rf /usr/share/doc/$PACKAGE; fi; if [ ! -d /usr/share/doc/sendmail ]; then mkdir -p /usr/share/doc/sendmail; chmod a+rx /usr/share/doc/sendmail; fi; ln -sf sendmail /usr/share/doc/$PACKAGE; ;; upgrade) # DPKG doesn't overwrite directories with symlinks... if [ -d /usr/share/doc/$PACKAGE ]; then rm -rf /usr/share/doc/$PACKAGE; fi; if [ ! -d /usr/share/doc/sendmail ]; then mkdir -p /usr/share/doc/sendmail; chmod a+rx /usr/share/doc/sendmail; fi; ln -sf sendmail /usr/share/doc/$PACKAGE; ;; abort-upgrade) ;; *) echo "$PACKAGE preinst called with unknown argument \`$1'" >&2; exit 1; ;; esac; #DEBHELPER# exit 0;