also get rid of that csh script (tested only on ULTRIX and SunOS 3/4 õÕ)
[alioth/cvs.git] / debian / postrm
index ed1136b..156587f 100644 (file)
@@ -1,20 +1,42 @@
-#! /bin/sh
-# $MirOS: contrib/hosted/tg/deb/cvs/debian/postrm,v 1.1 2010/09/16 00:18:40 tg Exp $
+#!/bin/sh
+# $MirOS: contrib/hosted/tg/deb/cvs/debian/postrm,v 1.4 2011/12/04 14:45:59 tg Exp $
 
 set -e
 
+# This maintainer script can be called the following ways:
+#
+# * postrm "remove"
+# * postrm "purge"
+# * old-postrm "upgrade" $new_version
+# * disappearers-postrm "disappear" $overwriter $o_version
+# The package's files have been removed or replaced; only Essential pak-
+# kages may be available; skip gracefully actions requiring Depends.
+#
+# * new-postrm "failed-upgrade" $old_version
+# Called when 'old-postrm "upgrade"' fails; the new package is unpacked,
+# Essential packages and Pre-Depends are available; the latter have been
+# configured and never removed but may be Unpacked or Half-Configured.
+#
+# * new-postrm "abort-install" [$old_version]
+# * new-postrm "abort-upgrade" $old_version
+# Called when preinst fails; package is not unpacked. Essential packages
+# and (unpacked or Half-Configured) Pre-Depends are available.
+
 case $1 in
+remove)
+       ;;
+
 purge)
-       rm -f /etc/cvs.conf /etc/cvs-cron.conf /etc/cvs-pserver.conf
+       rm -f /etc/cvs.conf /etc/cvs-cron.conf /etc/cvs-pserver.conf /etc/cron.weekly/cvs
        test -x /usr/sbin/update-inetd && update-inetd --remove "^cvspserver"
-       delgroup --system --only-if-empty _cvsadmin
+       (delgroup --system --only-if-empty _cvsadmin || :)
        ;;
 
-remove|upgrade|failed-upgrade|abort-install|abort-upgrade|disappear)
+upgrade|disappear|failed-upgrade|abort-install|abort-upgrade)
        ;;
 
 *)
-       echo >&2 "postrm called with unknown argument '$1'"
+       echo >&2 "postrm called with unknown subcommand '$1'"
        exit 1
        ;;
 esac