Package: src:systemd
Followup-For: Bug #711245

Updated patch to also add a udev.bug-script, which
runs udevadm info --export-db to print the udev
database.

-- System Information:
Debian Release: jessie/sid
  APT prefers unstable
  APT policy: (990, 'unstable'), (103, 'experimental')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 3.11.0-rc3-00004-g36f571e (SMP w/4 CPU cores)
Locale: LANG=de_DE.UTF-8, LC_CTYPE=de_DE.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
>From a38efa0fce2eda731f0e77ccfbfb33e3132eb72b Mon Sep 17 00:00:00 2001
From: Daniel Schaal <farb...@web.de>
Date: Sun, 28 Jul 2013 08:57:16 +0200
Subject: [PATCH] Add bug-script to systemd and udev

This gives the output of systemd-delta, systemctl dump
and the contents of /var/lib/systemd/deb-systemd-helper-enabled.

Print the udev database for udev.

Closes: #711245
---
 debian/systemd.bug-script | 23 +++++++++++++++++++++++
 debian/udev.bug-script    |  7 +++++++
 2 files changed, 30 insertions(+)
 create mode 100644 debian/systemd.bug-script
 create mode 100644 debian/udev.bug-script

diff --git a/debian/systemd.bug-script b/debian/systemd.bug-script
new file mode 100644
index 0000000..a326f03
--- /dev/null
+++ b/debian/systemd.bug-script
@@ -0,0 +1,23 @@
+#!/bin/sh
+
+_header() {
+    echo "--------------" >&3
+    echo "$1:" >&3
+    echo "--------------" >&3
+}
+
+_header "systemd-delta"
+# remove highlighting escape codes from systemd-delta output
+systemd-delta --no-pager|sed "s%\x1b[^m]*m%%g" >&3
+
+if [ -d /run/systemd/system ]; then
+    echo >&3
+    _header "systemctl dump"
+    systemctl --no-pager dump >&3
+fi
+
+if [ -d /var/lib/systemd/deb-systemd-helper-enabled ]; then
+    echo >&3
+    _header "Contents of /var/lib/systemd/deb-systemd-helper-enabled"
+    head -n100 $(find /var/lib/systemd/deb-systemd-helper-enabled -type f | tr '\n' ' ')
+fi
diff --git a/debian/udev.bug-script b/debian/udev.bug-script
new file mode 100644
index 0000000..eb0ca25
--- /dev/null
+++ b/debian/udev.bug-script
@@ -0,0 +1,7 @@
+#!/bin/sh
+
+echo "--------------" >&3
+echo "udev database:" >&3
+echo "--------------" >&3
+
+udevadm info --export-db >&3
-- 
1.8.4.rc1

Reply via email to