| 1 |
#!/bin/bash |
| 2 |
|
| 3 |
cat <<EOF |
| 4 |
|
| 5 |
Providing additional information can help diagnose problems with systemd. |
| 6 |
Specifically, this would include: |
| 7 |
- fstab configuration (copy of /etc/fstab). |
| 8 |
- local modifications of unit files (output of systemd-delta). |
| 9 |
- state of running services and units (output of systemd-analyze dump). |
| 10 |
- enabled/disabled state of installed services. |
| 11 |
If this information is not relevant for your bug report or you have privacy |
| 12 |
concerns, please choose no. |
| 13 |
|
| 14 |
EOF |
| 15 |
|
| 16 |
yesno "Do you want to provide additional information [Y|n]? " yep |
| 17 |
[ "$REPLY" = yep ] || exit 0 |
| 18 |
|
| 19 |
# We don’t clean up this directory because there is no way to know when |
| 20 |
# reportbug finished running, and reportbug needs the files around. |
| 21 |
# Given that those are just a couple of kilobytes in size and people |
| 22 |
# generally don’t file a lot of bugs, I don’t think it’s a big deal. |
| 23 |
DIR=$(mktemp -d) |
| 24 |
|
| 25 |
echo "-- BEGIN ATTACHMENTS --" >&3 |
| 26 |
|
| 27 |
# remove highlighting escape codes from systemd-delta output |
| 28 |
systemd-delta --no-pager 2>&1 |sed "s%\x1b[^m]*m%%g" >$DIR/systemd-delta.txt |
| 29 |
echo "$DIR/systemd-delta.txt" >&3 |
| 30 |
|
| 31 |
if [ -d /run/systemd/system ]; then |
| 32 |
systemd-analyze --no-pager dump >$DIR/systemd-analyze-dump.txt 2>&1 |
| 33 |
echo "$DIR/systemd-analyze-dump.txt" >&3 |
| 34 |
busctl --no-pager get-property org.freedesktop.systemd1 /org/freedesktop/systemd1 org.freedesktop.systemd1.Manager Tainted >$DIR/taints.txt 2>&1 |
| 35 |
echo "$DIR/taints.txt" >&3 |
| 36 |
fi |
| 37 |
|
| 38 |
if [ -d /var/lib/systemd/deb-systemd-helper-enabled ]; then |
| 39 |
head -n100 $(find /var/lib/systemd/deb-systemd-helper-enabled -type f | tr '\n' ' ') >$DIR/dsh-enabled.txt |
| 40 |
echo "$DIR/dsh-enabled.txt" >&3 |
| 41 |
fi |
| 42 |
|
| 43 |
echo "/etc/fstab" >&3 |
| 44 |
|
| 45 |
echo "-- END ATTACHMENTS --" >&3 |