~xnox/ubuntu/quantal/mdadm/merge

« back to all changes in this revision

Viewing changes to debian/bugscript

  • 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
 
#!/bin/bash
2
 
#
3
 
# mdadm bug submission control script
4
 
#
5
 
# allows Debian's bug tools to include relevant information in bug reports.
6
 
#
7
 
# Copyright © martin f. krafft <madduck@debian.org>
8
 
# distributed under the terms of the Artistic Licence 2.0
9
 
#
10
 
# we need /bin/bash for readline and -n capabalities in the prompt(s)
11
 
#
12
 
set -eu
13
 
 
14
 
if ! command -v yesno >/dev/null; then
15
 
  if [ -r /usr/share/reportbug/handle_bugscript ]; then
16
 
    exec /usr/share/reportbug/handle_bugscript ". $0" /dev/stdout
17
 
  fi
18
 
  yesno() {
19
 
    read -n1 -p"$1" REPLY
20
 
    case "$REPLY" in
21
 
      [yY]) REPLY=yep;;
22
 
      [nN]) REPLY=nop;;
23
 
      ('') REPLY="$2";;
24
 
    esac
25
 
  }
26
 
  exec 3>&1
27
 
fi
28
 
 
29
 
if [ ! -r /proc/mdstat ]; then
30
 
  echo "The local system does not have MD (RAID) support: no drivers loaded."
31
 
  echo "Without MD support, I cannot collect as much information as I'd like."
32
 
 
33
 
  #yesno "Are you sure you want to report a bug at this time? " yep
34
 
  yesno "Hit any key to continue..." yep
35
 
  #[ "$REPLY" = yep ] || exit 1
36
 
fi
37
 
 
38
 
echo "--- mount output" >&3
39
 
mount >&3
40
 
echo >&3
41
 
 
42
 
echo "--- mdadm.conf" >&3
43
 
if [ -r /etc/mdadm/mdadm.conf ]; then
44
 
  cat /etc/mdadm/mdadm.conf >&3
45
 
else
46
 
  echo no mdadm.conf file. >&3
47
 
fi
48
 
echo >&3
49
 
 
50
 
echo "--- /proc/mdstat:" >&3
51
 
cat /proc/mdstat >&3 2>&3 || :
52
 
echo >&3
53
 
  
54
 
echo "--- /proc/partitions:" >&3
55
 
cat /proc/partitions >&3 2>&3 || :
56
 
echo >&3
57
 
 
58
 
echo "--- initrd.img-$(uname -r):" >&3
59
 
if [ -r /boot/initrd.img-$(uname -r) ]; then
60
 
  zcat /boot/initrd.img-$(uname -r) 2>&3 | cpio -t 2>&3 | egrep '/md[a/]' >&3
61
 
fi
62
 
echo >&3
63
 
 
64
 
if [ -r /proc/modules ]; then
65
 
  echo "--- /proc/modules:" >&3
66
 
  egrep '(dm_|raid|linear|multipath|faulty)' < /proc/modules >&3 || :
67
 
  echo >&3
68
 
fi
69
 
 
70
 
if [ -r /var/log/syslog ]; then
71
 
  echo "--- /var/log/syslog:" >&3
72
 
  egrep "^\w{3} [ :[:digit:]]{11} ($(hostname)|localhost) (kernel: md|mdadm): " /var/log/syslog >&3 || :
73
 
  echo >&3
74
 
fi
75
 
 
76
 
echo "--- volume detail:" >&3
77
 
for dev in /dev/[hs]d[a-z]*; do mdadm -E $dev 2>/dev/null && echo -- || :; done >&3
78
 
echo >&3
79
 
 
80
 
if [ -r /proc/cmdline ]; then
81
 
  echo "--- /proc/cmdline" >&3
82
 
  cat /proc/cmdline >&3
83
 
  echo >&3
84
 
fi
85
 
 
86
 
if [ -f /boot/grub/menu.lst ]; then
87
 
  echo "--- grub:" >&3
88
 
  if [ -r /boot/grub/menu.lst ]; then
89
 
    grep '^[^#].*root=' /boot/grub/menu.lst >&3 || :
90
 
  else
91
 
    echo menu.lst file not readable. >&3
92
 
  fi
93
 
  echo >&3
94
 
fi
95
 
 
96
 
if [ -f /etc/lilo.conf ]; then
97
 
  echo "--- lilo:" >&3
98
 
  if [ -r /etc/lilo.conf ]; then
99
 
    egrep '^([^#].*)?root=' /etc/lilo.conf >&3 || :
100
 
  else
101
 
    echo lilo.conf file not readable. >&3
102
 
  fi
103
 
  echo >&3
104
 
fi