3
# mdadm bug submission control script
5
# allows Debian's bug tools to include relevant information in bug reports.
7
# Copyright © 2006 martin f. krafft <madduck@debian.org>
8
# distributed under the terms of the Artistic Licence.
10
# we need /bin/bash for readline capabalities in the prompt(s)
13
if [ ! -r /proc/mdstat ]; then
14
echo "The local system does not have RAID support (no drivers loaded)."
15
echo "Without RAID support, I cannot collect as much information as I'd like."
16
yesno "Are you sure you want to report a bug at this time? " yep
18
[ "$REPLY" = yep ] || exit 0
21
echo "--- mount output" >&3
25
echo "--- mdadm.conf" >&3
26
if [ -r /etc/mdadm/mdadm.conf ]; then
27
cat /etc/mdadm/mdadm.conf >&3
29
echo no mdadm.conf file. >&3
33
echo "--- /proc/mdstat:" >&3
37
echo "--- /proc/partitions:" >&3
38
cat /proc/partitions >&3 2>&3 || true
41
echo "--- initrd.img-$(uname -r):" >&3
42
if [ -r /boot/initrd.img-$(uname -r) ]; then
43
zcat /boot/initrd.img-$(uname -r) 2>&3 | cpio -t 2>&3 | egrep '/md[a/]' >&3
47
if [ -r /proc/modules ]; then
48
echo "--- /proc/modules:" >&3
49
egrep '(dm_|raid|linear|multipath|faulty)' < /proc/modules >&3
53
if [ -r /var/log/syslog ]; then
54
echo "--- /var/log/syslog:" >&3
55
egrep "^\w{3} [ :[:digit:]]{11} ($(hostname)|localhost) (kernel: md|mdadm): " /var/log/syslog >&3