Revision 24167,
1.3 KB
checked in by broder, 15 years ago
(diff) |
Import schroot upstream into subversion.
|
Rev | Line | |
---|
[24167] | 1 | #! /bin/sh |
---|
| 2 | # postinst script for schroot |
---|
| 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/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 | # Move a conffile without triggering a dpkg question |
---|
| 26 | mv_conffile() { |
---|
| 27 | OLDCONFFILE="$1" |
---|
| 28 | NEWCONFFILE="$2" |
---|
| 29 | |
---|
| 30 | if [ -e "$OLDCONFFILE" ]; then |
---|
| 31 | echo "Preserving user changes to $NEWCONFFILE ..." |
---|
| 32 | mv -f "$NEWCONFFILE" "$NEWCONFFILE".dpkg-new |
---|
| 33 | mv -f "$OLDCONFFILE" "$NEWCONFFILE" |
---|
| 34 | fi |
---|
| 35 | } |
---|
| 36 | |
---|
| 37 | # dh_installdeb will replace this with shell code automatically |
---|
| 38 | # generated by other debhelper scripts. |
---|
| 39 | |
---|
| 40 | #DEBHELPER# |
---|
| 41 | |
---|
| 42 | exit 0 |
---|
Note: See
TracBrowser
for help on using the repository browser.