~ubuntu-branches/ubuntu/intrepid/devmapper/intrepid

« back to all changes in this revision

Viewing changes to debian/dmsetup.preinst

  • Committer: Bazaar Package Importer
  • Author(s): Martin Pitt
  • Date: 2008-06-02 17:22:40 UTC
  • mfrom: (1.1.6 upstream)
  • Revision ID: james.westby@ubuntu.com-20080602172240-tb5pinmq9zxghxyb
Tags: 2:1.02.25-1ubuntu1
* Merge from Debian unstable. Remaining Ubuntu changes:
  - Call dmsetup from udev rules to name the device, so udev creates them
    if they do not already exist, and fill in information about the
    filesystem on the device afterwards.
    (forwarded to Debian #455746):
    + Add debian/dmsetup.udev: Naming udev rules.
    + debian/rules: Call dh_installudev to install above file.
    + debian/control: Add Recommends: dmsetup to the library and the udeb.
  - Support udev-controlled devmapper in initramfs, for consistent device
    discovery/naming during boot and hotplug:
    + Add debian/dmsetup.initramfs: Hook for copying dmsetup and udev rules
      to the initramfs.
    + debian/rules: Copy hook to build directory.
    + debian/dmsetup.install: Install above file from build directory.
    + debian/dmsetup.postinst: Call update-initramfs.
  - debian/rules: Copy po/device-mapper.po to device-mapper.pot so Rosetta
    has a POT file to import.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
#!/bin/sh -e
2
 
# This script can be called in the following ways:
3
 
#
4
 
# Before the package is installed:
5
 
#       <new-preinst> install
6
 
#
7
 
# Before removed package is upgraded:
8
 
#       <new-preinst> install <old-version>
9
 
#
10
 
# Before the package is upgraded:
11
 
#       <new-preinst> upgrade <old-version>
12
 
#
13
 
#
14
 
# If postrm fails during upgrade or fails on failed upgrade:
15
 
#       <old-preinst> abort-upgrade <new-version>
16
 
 
17
 
 
18
 
case "$1" in
19
 
    install|upgrade)
20
 
        # Upgrade from feisty
21
 
        if dpkg --compare-versions "$2" lt "2:1.02.18-1ubuntu1"; then
22
 
            rm -f /etc/udev/rules.d/25-dmsetup.rules
23
 
        fi
24
 
        ;;
25
 
 
26
 
    abort-upgrade)
27
 
        ;;
28
 
 
29
 
    *)
30
 
        echo "$0 called with unknown argument \`$1'" 1>&2
31
 
        exit 1
32
 
        ;;
33
 
esac
34
 
 
35
 
#DEBHELPER#
36
 
exit 0