apt.bug-script 886 B

12345678910111213141516171819202122232425262728293031323334
  1. #!/bin/bash -e
  2. # reportbug #169495
  3. if [ -z "$YESNO" ]; then
  4. YESNO=$"yYnN"
  5. fi
  6. cat <<EOF
  7. I can automatically include various information about your apt configuration in
  8. your bug report. This information may help to diagnose your problem.
  9. EOF
  10. yesno "May I include your apt configuration (/etc/apt/apt.conf et al)? [Y/n] " yep
  11. if [ "$REPLY" = "yep" ]; then
  12. echo -e "\n-- apt-config dump --\n" >&3
  13. apt-config dump >&3 2>&1
  14. fi
  15. for config in /etc/apt/preferences /etc/apt/preferences.d/* /etc/apt/sources.list /etc/apt/sources.list.d/* ; do
  16. if [ -f $config ]; then
  17. yesno "May I include your $config configuration file? [Y/n] " yep
  18. if [ "$REPLY" = "yep" ]; then
  19. echo -e "\n-- $config --\n" >&3
  20. cat $config >&3
  21. else
  22. echo -e "\n-- ($config present, but not submitted) --\n" >&3
  23. fi
  24. else
  25. echo -e "\n-- (no $config present) --\n" >&3
  26. fi
  27. done