~cr3/ubuntu/quantal/unattended-upgrades/1046438

« back to all changes in this revision

Viewing changes to debian/prerm

  • Committer: Package Import Robot
  • Author(s): Michael Vogt
  • Date: 2011-11-08 17:37:31 UTC
  • Revision ID: package-import@ubuntu.com-20111108173731-py60wunble40f56z
Tags: 0.74
* test improvements
* fix crash when no packages are upgraded
* only run dpkg if there are packages to upgrade (closes: #647476)
* include "stable-updates" in the configuration example
* debian/po/de.po:
  - updated, thanks to Helge Kreutzmann (closes: #647172)
* debian/rules:
  - install initscripts but do not run them on install/upgrade
    (closes: #645919), thanks to Teodor MICU
* data/50unattended-upgrades.Debian:
  - update default Debian config for squeeze, thanks to 
    John Feuerstein for the example (closes: #609854)
* debian/prerm:
  - ignore failures from versions where the initscript is run
    with "stop" even when not in shutdown mode (closes: #645919)
* unattended-upgrade:
  - ensure to release shutdown-lock before shutting down 
    (closes: #645919)
* debian/postinst, data/20auto-upgrades-disabled:
  - allow disabling via debconf (closes: #645971)

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#!/bin/sh
 
2
# prerm script for unattended-upgrades
 
3
#
 
4
# see: dh_installdeb(1)
 
5
 
 
6
set -e
 
7
 
 
8
# summary of how this script can be called:
 
9
#        * <prerm> `remove'
 
10
#        * <old-prerm> `upgrade' <new-version>
 
11
#        * <new-prerm> `failed-upgrade' <old-version>
 
12
#        * <conflictor's-prerm> `remove' `in-favour' <package> <new-version>
 
13
#        * <deconfigured's-prerm> `deconfigure' `in-favour'
 
14
#          <package-being-installed> <version> `removing'
 
15
#          <conflicting-package> <version>
 
16
# for details, see http://www.debian.org/doc/debian-policy/ or
 
17
# the debian-policy package
 
18
 
 
19
 
 
20
case "$1" in
 
21
    remove|upgrade|deconfigure)
 
22
    ;;
 
23
 
 
24
    failed-upgrade)
 
25
    if dpkg --compare-versions "$2" lt 0.73.3; then
 
26
        cat >&2 <<EOF
 
27
NOTE: Ignoring prerm failure caused by failure to "stop" unattended-upgrades.
 
28
NOTE: See Debian bug #645919 for details.
 
29
EOF
 
30
        exit 0
 
31
    fi
 
32
    ;;
 
33
 
 
34
    *)
 
35
        echo "prerm called with unknown argument \`$1'" >&2
 
36
        exit 1
 
37
    ;;
 
38
esac
 
39
 
 
40
# dh_installdeb will replace this with shell code automatically
 
41
# generated by other debhelper scripts.
 
42
 
 
43
#DEBHELPER#
 
44
 
 
45
exit 0