PKGBUILDs/community/esmtp/esmtp.install
2009-10-09 21:15:33 -05:00

35 lines
917 B
Text

chk_and_link() { [ -e $1 ] || ln -s $2 $1; }
kill_link() { [ "$(readlink $1)" = "$2" ] && rm $1; }
post_install()
{
chk_and_link /usr/sbin/sendmail /usr/bin/esmtp
chk_and_link /usr/lib/sendmail /usr/bin/esmtp
chk_and_link /usr/bin/mailq /usr/bin/esmtp
chk_and_link /usr/bin/newaliases /usr/bin/esmtp
chk_and_link /usr/share/man/man1/sendmail.1.gz esmtp.1.gz
chk_and_link /usr/share/man/man1/mailq.1.gz esmtp.1.gz
chk_and_link /usr/share/man/man1/newaliases.1.gz esmtp.1.gz
}
post_upgrade()
{
post_install
}
pre_remove()
{
kill_link /usr/sbin/sendmail /usr/bin/esmtp
kill_link /usr/lib/sendmail /usr/bin/esmtp
kill_link /usr/bin/mailq /usr/bin/esmtp
kill_link /usr/bin/newaliases /usr/bin/esmtp
kill_link /usr/share/man/man1/sendmail.1.gz esmtp.1.gz
kill_link /usr/share/man/man1/mailq.1.gz esmtp.1.gz
kill_link /usr/share/man/man1/newaliases.1.gz esmtp.1.gz
}
op=$1
shift
$op $*