~ubuntu-branches/debian/jessie/debfoster/jessie

« back to all changes in this revision

Viewing changes to debian/postinst

  • Committer: Bazaar Package Importer
  • Author(s): Ivo Timmermans
  • Date: 2002-01-17 23:08:39 UTC
  • Revision ID: james.westby@ubuntu.com-20020117230839-vomofv7zlfzc6cn8
Tags: 2.5-1
New upstream release (Closes: #127829, #123749)

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#! /bin/sh
 
2
# postinst script for #PACKAGE#
 
3
#
 
4
# see: dh_installdeb(1)
 
5
 
 
6
set -e
 
7
 
 
8
# summary of how this script can be called:
 
9
#        * <postinst> `configure' <most-recently-configured-version>
 
10
#        * <old-postinst> `abort-upgrade' <new version>
 
11
#        * <conflictor's-postinst> `abort-remove' `in-favour' <package>
 
12
#          <new-version>
 
13
#        * <deconfigured's-postinst> `abort-deconfigure' `in-favour'
 
14
#          <failed-install-package> <version> `removing'
 
15
#          <conflicting-package> <version>
 
16
# for details, see /usr/share/doc/packaging-manual/
 
17
#
 
18
# quoting from the policy:
 
19
#     Any necessary prompting should almost always be confined to the
 
20
#     post-installation script, and should be protected with a conditional
 
21
#     so that unnecessary prompting doesn't happen if a package's
 
22
#     installation fails and the `postinst' is called with `abort-upgrade',
 
23
#     `abort-remove' or `abort-deconfigure'.
 
24
 
 
25
OLDKEEPERS="/etc/apt/keepers"
 
26
NEWKEEPERS="/var/lib/debfoster/keepers"
 
27
 
 
28
case "$1" in
 
29
    configure)
 
30
        if [ -f $OLDKEEPERS -a \! -f $NEWKEEPERS ] ; then
 
31
            echo "$OLDKEEPERS exists, do you want me to move it"
 
32
            echo -n "to its new location, $NEWKEEPERS? [Y/n] "
 
33
            read ans
 
34
            case $ans in
 
35
                Y|y|Yes|yes|YES|"")
 
36
                    mv -fv $OLDKEEPERS $NEWKEEPERS
 
37
                ;;
 
38
                *)
 
39
                    echo "You don't want to move the file.  Fine, but you will be asked"
 
40
                    echo "again which packages you want to keep when you run debfoster."
 
41
                    echo "Or you could move $OLDKEEPERS to $NEWKEEPERS by hand."
 
42
                ;;
 
43
            esac
 
44
          fi
 
45
    ;;
 
46
 
 
47
    abort-upgrade|abort-remove|abort-deconfigure)
 
48
 
 
49
    ;;
 
50
 
 
51
    *)
 
52
        echo "postinst called with unknown argument \`$1'" >&2
 
53
        exit 0
 
54
    ;;
 
55
esac
 
56
 
 
57
# dh_installdeb will replace this with shell code automatically
 
58
# generated by other debhelper scripts.
 
59
 
 
60
#DEBHELPER#
 
61
 
 
62
exit 0
 
63
 
 
64