File: postinst.in

package info (click to toggle)
mailcrypt 3.5.8-2
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 928 kB
  • ctags: 422
  • sloc: lisp: 4,439; python: 437; makefile: 208; sh: 170
file content (67 lines) | stat: -rw-r--r-- 1,782 bytes parent folder | download
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
#include "variables"
#!/bin/bash -e
#
# postinst configuration file for Debian <:=$PACKAGE:> package.
# $Id: postinst.in,v 1.10 2002/09/27 13:03:15 salve Exp $
#
<:=@COPYRIGHT:>//

set -o posix

source <:=$CONFMODULE:>
db_version 2.0

conf_autoload () {
    db_get <:=$PACKAGE:>/default || true
    if [ $RET = "true" ]; then umask 022;
	cat <<-EOF ><:=$sstartd:>/<:=$EPRIORITY:><:=$PACKAGE:>.el
		(require 'mailcrypt-init)
	EOF
	chmod 644 <:=$sstartd:>/<:=$EPRIORITY:><:=$PACKAGE:>.el
    else
	rm -f <:=$sstartd:>/<:=$EPRIORITY:><:=$PACKAGE:>.el
    fi
    return 0
}

case "$1" in
    (abort-remove|abort-upgrade|configure)
    <:# abort-remove in-favour ${3:newpkg} ${4:newver}
      # (undo prerm remove in-favour $3 $4):>//
    <:# abort-upgrade ${2:newver}
      # (undo prerm upgrade $2):>//
    <:# configure ${2:lastconfver}
      # (or, if there wasn't an old version at all)
      # configure ${2=""|"<unknow>"}
      # (or, if dpkg version is very old)
      # configure
      # (dregistered files and conffiles have been installed):>//
	<:# install byte compiled lisp:>//
	<:=$EINSTALL:> <:=$PACKAGE:>
	<:# install doc menu into doc dir:>//
	<:=$DINSTALL:> <:="$docbase/$PACKAGE":>
	<:# install info menu into info dir:>//
	<:=$IINSTALL:> <:="$info/$PACKAGE.info.gz":>
	<:# put or remove emacs startup file:>//
	conf_autoload
    ;;
    (abort-deconfigure)
    <:# abort-deconfigure in-favour ${3:newpkg} ${4:newver} removing ${6:oldpkg} ${7:oldver}
      # (undo prerm deconfigure in-favour $3 $4 removing $6 $7):>//
	<:# put or remove emacs startup file:>//
	conf_autoload
    ;;
    (*)
	echo "${0##*/}: Called with unknown argument \`$1'." >&2
    ;;
esac

<:# to be sure debconf moves on:>//
db_stop

exit 0
<:
# local Variables:
# mode: shell-script
# end:
:>//