~ubuntu-branches/ubuntu/intrepid/multipath-tools/intrepid-proposed

« back to all changes in this revision

Viewing changes to debian/initramfs/hooks

  • Committer: Bazaar Package Importer
  • Author(s): Soren Hansen
  • Date: 2007-12-13 03:03:31 UTC
  • mfrom: (1.1.4 upstream)
  • Revision ID: james.westby@ubuntu.com-20071213030331-bp0r75kwexi0o33m
Tags: 0.4.8-5ubuntu1
* Merge from debian unstable, remaining changes:
  - DebianMaintainerField.
  - Suggest sg3-utils, Conflict with sg-utils.
  - Replace multipath-tools-boot init script with udev rules in
    kpartx.rules.
  - Add /sbin/hsg80_start.
  - Move udev rules to priority 95, and drop call to dmsetup_env.
  - Add devices as they appear
  - Fix preinst script to modprobe dm-multipath. This will make sure
    that multipathd will be able to start.
  - Fix init script not to die on stop if multipathd is not running.
  - Add prerm script to not fail when upgrading from a broken version of
    multipathd.
  - Set umask in multipathd.
  - Handle udev rules priority change in preinst.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#!/bin/sh
 
2
 
 
3
PREREQS="udev"
 
4
 
 
5
prereqs() { echo "$PREREQS"; }
 
6
 
 
7
case $1 in
 
8
prereqs)
 
9
        prereqs
 
10
        exit 0
 
11
        ;;
 
12
esac
 
13
 
 
14
if [ ! -x /sbin/multipath ]; then
 
15
        exit 0
 
16
fi
 
17
 
 
18
. /usr/share/initramfs-tools/hook-functions
 
19
 
 
20
add_bindings()
 
21
{
 
22
  if [ -r /var/lib/multipath/bindings ]; then 
 
23
      mkdir -p $DESTDIR/var/lib/multipath
 
24
      cp /var/lib/multipath/bindings $DESTDIR/var/lib/multipath/
 
25
  fi
 
26
}
 
27
 
 
28
copy_exec /sbin/multipath               /sbin
 
29
copy_exec /sbin/kpartx                  /sbin
 
30
copy_exec /sbin/devmap_name             /sbin
 
31
copy_exec /sbin/dmsetup                 /sbin
 
32
copy_exec /lib/udev/dmsetup_env         /lib/udev
 
33
copy_exec /sbin/mpath_prio_alua         /sbin
 
34
copy_exec /sbin/mpath_prio_emc          /sbin
 
35
copy_exec /sbin/mpath_prio_hp_sw        /sbin
 
36
copy_exec /sbin/mpath_prio_rdac         /sbin
 
37
copy_exec /sbin/mpath_prio_netapp       /sbin
 
38
copy_exec /sbin/mpath_prio_random       /sbin
 
39
copy_exec /sbin/mpath_prio_hds_modular  /sbin
 
40
copy_exec /sbin/mpath_prio_balance_units /sbin
 
41
 
 
42
[ -r /etc/multipath.conf ] && cp /etc/multipath.conf $DESTDIR/etc/
 
43
add_bindings
 
44
 
 
45
for x in dm-multipath dm-round-robin dm-emc; do
 
46
        manual_add_modules ${x}
 
47
done
 
48