File: postinst

package info (click to toggle)
mh 6.8.4-28
  • links: PTS
  • area: main
  • in suites: slink
  • size: 7,012 kB
  • ctags: 7,496
  • sloc: ansic: 75,211; sh: 3,112; lisp: 2,205; ml: 1,894; makefile: 724; perl: 482; csh: 150; tcl: 66; sed: 43; awk: 7
file content (54 lines) | stat: -rw-r--r-- 1,593 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
#!/bin/sh
# postinst for mh

set -e

case "$1" in
  configure)
    # Configure this package.
    ldconfig
    # manage our SUIDness
    if command -v suidregister >/dev/null 2>&1; then
        suidregister -s mh /usr/bin/mh/inc root mail 2755
        suidregister -s mh /usr/bin/mh/msgchk root mail 2755
    else
        chown root.mail /usr/bin/mh/inc
        chmod 2755 /usr/bin/mh/inc
        chown root.mail /usr/bin/mh/msgchk
        chmod 2755 /usr/bin/mh/msgchk
    fi
    # little rather unnecessary warning
    echo "warning: the mh package is deprecated in favor of nmh"
    ;;
  abort-upgrade)
    # Back out of an attempt to upgrade this package FROM THIS VERSION
    # to version $2.  Undo the effects of "prerm upgrade $2".
    :
    ;;
  abort-remove)
    if test "$2" != in-favour; then
      echo "$0: undocumented call to \`postinst $*'" 1>&2
      exit 1
    fi
    # Back out of an attempt to remove this package, which was due to
    # a conflict with package $3 (version $4).  Undo the effects of
    # "prerm remove in-favour $3 $4".
    :
    ;;
  abort-deconfigure)
    if test "$2" != in-favour -o "$5" != removing; then
      echo "$0: undocumented call to \`postinst $*'" 1>&2
      exit 1
    fi
    # Back out of an attempt to deconfigure this package, which was
    # due to package $6 (version $7) which we depend on being removed
    # to make way for package $3 (version $4).  Undo the effects of
    # "prerm deconfigure in-favour $3 $4 removing $6 $7".
    :
    ;;
  *) echo "$0: didn't understand being called with \`$1'" 1>&2
     exit 1;;
esac

exit 0