Commit 565d5c3e authored by Michael Biebl's avatar Michael Biebl

Update udev bug-script to attach instead of paste extra info if a new enough...

Update udev bug-script to attach instead of paste extra info if a new enough reportbug version is available.
parent ecebff53
systemd (204-12) UNRELEASED; urgency=medium
[ Martin Pitt ]
* Change the sg loading rule (for Debian #657948) back to using modprobe.
kmod is too fast and then sg races with sd, causing the latter to not see
SCSI disks. (Closes: #752591, #752605)
[ Michael Biebl ]
* Update udev bug-script to attach instead of paste extra info if a new
enough reportbug version is available.
-- Martin Pitt <mpitt@debian.org> Wed, 25 Jun 2014 10:22:33 +0200
systemd (204-11) unstable; urgency=medium
......
#!/bin/sh
echo "--------------" >&3
echo "udev database:" >&3
echo "--------------" >&3
REPORTBUG_VERSION=$(dpkg-query -f '${source:Version}' -W reportbug)
udevadm info --export-db >&3
# Depending on whether reportbug is new enough, we either write the output of
# our various commands to a file and attach them to the report (this needs
# reportbug ≥ 6.5.0) or just write them to the body of the bug report.
if dpkg --compare-versions "$REPORTBUG_VERSION" ge "6.5.0"; then
# We don’t clean up this directory because there is no way to know when
# reportbug finished running, and reportbug needs the files around.
# Given that those are just a couple of kilobytes in size and people
# generally don’t file a lot of bugs, I don’t think it’s a big deal.
DIR=$(mktemp -d)
echo "-- BEGIN ATTACHMENTS --" >&3
udevadm info --export-db >$DIR/udev-database.txt
echo "$DIR/udev-database.txt" >&3
echo "-- END ATTACHMENTS --" >&3
else
_header() {
echo "--------------" >&3
echo "$1:" >&3
echo "--------------" >&3
}
_header "udev database"
udevadm info --export-db >&3
fi
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment