after fixing the repo corruption, turn on maximum hardening flags as a bonus level...
[alioth/cvs.git] / debian / postinst
1 #!/bin/sh
2 # $MirOS: contrib/hosted/tg/deb/cvs/debian/postinst,v 1.4 2011/12/04 14:45:58 tg Exp $
3
4 set -e
5
6 # This maintainer script can be called the following ways:
7 #
8 # * new-postinst "configure" [$most_recently_configured_version]
9 # The package is unpacked; all dependencies are unpacked and, when there
10 # are no circular dependencies, configured.
11 #
12 # * old-postinst "abort-upgrade" $new_version
13 # * conflictors-postinst "abort-remove" "in-favour" $package
14 #       $new_version
15 # * postinst "abort-remove"
16 # * deconfigureds-postinst "abort-deconfigure" "in-favour"
17 #       $failed_install_package $fip_version ["removing"
18 #       $conflicting_package $cp_version]
19 # The package is unpacked; all dependencies are at least Half-Installed,
20 # previously been configured, and not removed. In some error situations,
21 # dependencies may not be even fully unpacked.
22 #
23 # * postinst "triggered" "${triggers[*]}"
24 # For trigger-only calls, i.e. if "configure" is not called.
25
26 # upgrade case from Debian CVS
27 nukes='/etc/cvs.conf /etc/cvs-cron.conf /etc/cvs-pserver.conf /etc/cron.weekly/cvs'
28 for x in $nukes; do
29         test -e "$x" || continue
30         rm -f $nukes
31         test -x /usr/sbin/update-inetd && update-inetd --remove "^cvspserver"
32         break
33 done
34
35 case $1 in
36 configure)
37         addgroup --force-badname --system _cvsadmin
38         ;;
39
40 abort-upgrade|abort-remove|abort-deconfigure)
41         ;;
42
43 triggered)
44         ;;
45
46 *)
47         echo >&2 "postinst called with unknown subcommand '$1'"
48         exit 1
49         ;;
50 esac
51
52 # dh_installdeb will replace this with shell code automatically
53 # generated by other debhelper scripts.
54
55 #DEBHELPER#
56
57 exit 0