~ubuntu-branches/ubuntu/wily/devmapper/wily

« back to all changes in this revision

Viewing changes to debian/dmsetup.udev.moved

  • Committer: Bazaar Package Importer
  • Author(s): Colin Watson
  • Date: 2008-11-02 22:30:23 UTC
  • mfrom: (0.1.3 lenny)
  • Revision ID: james.westby@ubuntu.com-20081102223023-v12814sxyz51o92r
Tags: 2:1.02.27-4ubuntu1
* Resynchronise with Debian. Remaining changes:
  - 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.
  - Create two new packages, libdevmapper-event1.02.1 and dmeventd. These
    packages will be used to help monitor dmraid events and log them to
    syslog.
  - debian/libdevmapper-dev.install: Add libdevmapper-event.h and
    libdevmapper-event.a to the dev package.
  - Empty DH_OPTIONS while running dh_makeshlibs so that the -p option
    works properly, so that we get proper udeb shlibs again.
  - Install udev rules in dmsetup-udeb.
* Remove stray debian/dmsetup.udev.moved file.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
# This file causes devicemapper devices to be assigned names by udev
2
 
# based on the name given to dmsetup.
3
 
# See udev(8) for syntax.
4
 
 
5
 
SUBSYSTEM!="block", GOTO="dmsetup_end"
6
 
KERNEL!="dm-*", GOTO="dmsetup_end"
7
 
ACTION!="add|change", GOTO="dmsetup_end"
8
 
 
9
 
# Obtain device status
10
 
IMPORT{program}="/sbin/dmsetup export -j%M -m%m"
11
 
ENV{DM_NAME}!="?*", GOTO="dmsetup_end"
12
 
 
13
 
# Make the device take the /dev/mapper name
14
 
OPTIONS+="string_escape=none", NAME="mapper/$env{DM_NAME}"
15
 
SYMLINK+="disk/by-id/dm-name-$env{DM_NAME}"
16
 
ENV{DM_UUID}=="?*", SYMLINK+="disk/by-id/dm-uuid-$env{DM_UUID}"
17
 
 
18
 
# Skip vol_id for suspended devices and those with empty or error tables
19
 
ENV{DM_STATE}=="SUSPENDED", GOTO="dmsetup_end"
20
 
ENV{DM_TARGET_TYPES}=="|*error*", GOTO="dmsetup_end"
21
 
 
22
 
# by-uuid and by-label symlinks
23
 
IMPORT{program}="vol_id --export $tempnode"
24
 
OPTIONS="link_priority=-100"
25
 
ENV{DM_UUID}=="DMRAID-*", OPTIONS="link_priority=100"
26
 
ENV{DM_TARGET_TYPES}=="*snapshot-origin*", OPTIONS="link_priority=-90"
27
 
ENV{ID_FS_USAGE}=="filesystem|other|crypto", ENV{ID_FS_UUID_ENC}=="?*", \
28
 
                        SYMLINK+="disk/by-uuid/$env{ID_FS_UUID_ENC}"
29
 
ENV{ID_FS_USAGE}=="filesystem|other", ENV{ID_FS_LABEL_ENC}=="?*", \
30
 
                        SYMLINK+="disk/by-label/$env{ID_FS_LABEL_ENC}"
31
 
 
32
 
LABEL="dmsetup_end"