~ubuntu-branches/ubuntu/hardy/mdadm/hardy-updates

« back to all changes in this revision

Viewing changes to debian/bugscript

  • Committer: Package Import Robot
  • Author(s): Scott James Remnant
  • Date: 2006-07-11 17:23:21 UTC
  • mfrom: (1.1.4)
  • Revision ID: package-import@ubuntu.com-20060711172321-070tz7lox9adujtw
Tags: 2.4.1-6ubuntu1
* Merge from debian unstable, remaining changes:
  - integration with initramfs-tools,
  - autocreate devices when udev is in use,
  - use lstat in mdopen.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#!/bin/bash -eu
 
2
#
 
3
# mdadm bug submission control script
 
4
#
 
5
# allows Debian's bug tools to include relevant information in bug reports.
 
6
#
 
7
# Copyright © 2006 martin f. krafft <madduck@debian.org>
 
8
# distributed under the terms of the Artistic Licence.
 
9
#
 
10
# we need /bin/bash for readline capabalities in the prompt(s)
 
11
#
 
12
 
 
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
 
17
 
 
18
  [ "$REPLY" = yep ] || exit 0
 
19
fi
 
20
 
 
21
echo "--- mount output" >&3
 
22
mount >&3
 
23
echo >&3
 
24
 
 
25
echo "--- mdadm.conf" >&3
 
26
if [ -r /etc/mdadm/mdadm.conf ]; then
 
27
  cat /etc/mdadm/mdadm.conf >&3
 
28
else
 
29
  echo no mdadm.conf file. >&3
 
30
fi
 
31
echo >&3
 
32
 
 
33
echo "--- /proc/mdstat:" >&3
 
34
cat /proc/mdstat >&3
 
35
echo >&3
 
36
  
 
37
echo "--- /proc/partitions:" >&3
 
38
cat /proc/partitions >&3 2>&3 || true
 
39
echo >&3
 
40
 
 
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
 
44
fi
 
45
echo >&3
 
46
 
 
47
if [ -r /proc/modules ]; then
 
48
  echo "--- /proc/modules:" >&3
 
49
  egrep '(dm_|raid|linear|multipath|faulty)' < /proc/modules >&3
 
50
  echo >&3
 
51
fi
 
52
 
 
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
 
56
  echo >&3
 
57
fi