~xnox/ubuntu/quantal/mdadm/merge

« back to all changes in this revision

Viewing changes to tests/env-09imsm-assemble

  • Committer: Dmitrijs Ledkovs
  • Author(s): Surbhi Palande
  • Date: 2010-09-30 17:46:19 UTC
  • mfrom: (1.1.25 sid)
  • Revision ID: dmitrijs.ledkovs@canonical.com-20100930174619-cqsokylnluraiyr8
Tags: 3.1.4-1+8efb9d1ubuntu1
* Merge from debian unstable. (LP: #603582) 
* Remaining changes
  - Assemble.c, config.c: upgraded to the mdadm-3.1.4 version of these files
    from Debian.
  - debian/control: we need udev and util-linux in the right version. We
    also remove the build dependency from quilt and docbook-to-man as both
    are not used in Ubuntus mdadm.
  - debian/initramfs/hook: kept the Ubuntus version for handling the absence
    of active raid arrays in <initramfs>/etc/mdadm/mdadm.conf
  - debian/initramfs/script.local-top.DEBIAN, debian/mdadm-startall,
    debian/mdadm.raid.DEBIAN: removed. udev does its job now instead.
  - debian/mdadm-startall.sgml, debian/mdadm-startall.8: documentation of
    unused startall script
  - debian/mdadm.config, debian/mdadm.postinst - let udev do the handling
    instead. Resolved merge conflict by keeping Ubuntu's version.
  - debian/rules: kept debian's switch to using dh_lintian
  - debian/mdadm.links, debian/mdadm.manpages: dropped owing to the fact
    that these are not used in Ubuntu. Also dropped the build-dep on docbook
    to man)
  - debian/mdadm.postinst, debian/mdadm.config, initramfs/init-premount:
    boot-degraded enablement; maintain udev starting of RAID devices;
    init-premount hook script for the initramfs, to provide information at
    boot
  - debian/mkconf.in is the older mkconf. Kept the Ubuntus version.
  - debian/rules: Kept Ubuntus version for installing apport hooks, not
    installing un-used startall script and for adding a udev rule
    corresponding to mdadm.
  - debian/install-rc, check.d/_numbers, check.d/root_on_raid: Ubuntu partman
    installer changes
  - debian/presubj: Dropped this unused bug reporting file. Instead use
    source_mdadm.py act as an apport hook for bug handling.
  - rename debian/mdadm.vol_id.udev to debian/mdadm.mdadm-blkid.udev so that
    the rules file ends up with a more reasonable name

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
imsm_check_hold() {
 
2
   if mdadm --remove $1 $2; then
 
3
       echo "$2 removal from $1 should have been blocked" >&2
 
4
       cat /proc/mdstat >&2
 
5
       mdadm -E $2
 
6
       exit 1
 
7
   fi
 
8
}
 
9
 
 
10
imsm_check_removal() {
 
11
   if ! mdadm --remove $1 $2 ; then
 
12
       echo "$2 removal from $1 should have succeeded" >&2
 
13
       cat /proc/mdstat >&2
 
14
       mdadm -E $2
 
15
       exit 1
 
16
   fi
 
17
}
 
18
 
 
19
setup_env() {
 
20
        export IMSM_DEVNAME_AS_SERIAL=1
 
21
        export IMSM_TEST_OROM=1
 
22
        container=/dev/md/container
 
23
        member=/dev/md/vol0
 
24
}
 
25
 
 
26
reset_env() {
 
27
        unset IMSM_DEVNAME_AS_SERIAL
 
28
        unset IMSM_TEST_OROM
 
29
        unset imsm_check
 
30
        unset container
 
31
        unset member
 
32
}