[kernel] r14331 - in dists/trunk/linux-2.6/debian: . templates/image.plain.bug

Ben Hutchings benh at alioth.debian.org
Sun Oct 4 19:43:49 UTC 2009


Author: benh
Date: Sun Oct  4 19:43:48 2009
New Revision: 14331

Log:
Optionally include network configuration and status in bug reports

Added:
   dists/trunk/linux-2.6/debian/templates/image.plain.bug/include-network
Modified:
   dists/trunk/linux-2.6/debian/changelog

Modified: dists/trunk/linux-2.6/debian/changelog
==============================================================================
--- dists/trunk/linux-2.6/debian/changelog	Sun Oct  4 19:19:58 2009	(r14330)
+++ dists/trunk/linux-2.6/debian/changelog	Sun Oct  4 19:43:48 2009	(r14331)
@@ -3,6 +3,7 @@
   [ Ben Hutchings ]
   * Include model information in bug reports
   * Include firmware package status in bug reports
+  * Optionally include network configuration and status in bug reports
 
  -- Ben Hutchings <ben at decadent.org.uk>  Sun, 04 Oct 2009 19:48:35 +0100
 

Added: dists/trunk/linux-2.6/debian/templates/image.plain.bug/include-network
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ dists/trunk/linux-2.6/debian/templates/image.plain.bug/include-network	Sun Oct  4 19:43:48 2009	(r14331)
@@ -0,0 +1,38 @@
+add_network() {
+  yesno "Include network configuration and status from this computer? " nop
+  test $REPLY = yep || return 0
+
+  echo '** Network interface configuration:' >&3
+  cat /etc/network/interfaces >&3
+  echo >&3
+  echo '** Network status:' >&3
+  if command -v ip >/dev/null; then
+    echo '*** IP interfaces and addresses:' >&3
+    ip address show >&3
+    echo >&3
+  fi
+  echo '*** Device statistics:' >&3
+  cat /proc/net/dev >&3
+  echo >&3
+  if command -v netstat >/dev/null; then
+    echo '*** Protocol statistics:' >&3
+    netstat -s >&3 || true
+    echo >&3
+  fi
+  echo '*** Device features:' >&3
+  for dir in /sys/class/net/*; do
+    echo -n "${dir##*/}: " >&3
+    cat "$dir"/features >&3
+  done
+  echo >&3
+}
+
+ask_network() {
+  test $same_system = yep || return 0
+  yesno "Include network configuration from this computer? " nop
+  test $REPLY = yep || return 0
+
+  echo '** Network interface configuration:' >&3
+  cat /etc/network/interfaces >&3
+  echo >&3
+}



More information about the Kernel-svn-changes mailing list