07_log_to_file_by_default.dpatch 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. #! /bin/sh -e
  2. ## 07_log_to_file_by_default.dpatch by <weasel@debian.org>
  3. ##
  4. ## All lines beginning with `## DP:' are a description of the patch.
  5. ## DP: No description.
  6. if [ $# -lt 1 ]; then
  7. echo "`basename $0`: script expects -patch|-unpatch as argument" >&2
  8. exit 1
  9. fi
  10. [ -f debian/patches/00patch-opts ] && . debian/patches/00patch-opts
  11. patch_opts="${patch_opts:--f --no-backup-if-mismatch} ${2:+-d $2}"
  12. case "$1" in
  13. -patch) patch -p1 ${patch_opts} < $0;;
  14. -unpatch) patch -R -p1 ${patch_opts} < $0;;
  15. *)
  16. echo "`basename $0`: script expects -patch|-unpatch as argument" >&2
  17. exit 1;;
  18. esac
  19. exit 0
  20. @DPATCH@
  21. diff -urNad tor-0.1.1.5/src/or/config.c /tmp/dpep.YwfNhI/tor-0.1.1.5/src/or/config.c
  22. --- tor-0.1.1.5/src/or/config.c
  23. +++ /tmp/dpep.YwfNhI/tor-0.1.1.5/src/or/config.c
  24. @@ -1548,7 +1548,7 @@
  25. /* Special case on first boot if no Log options are given. */
  26. if (!options->Logs && !from_setconf) {
  27. - config_line_append(&options->Logs, "Log", "notice stdout");
  28. + config_line_append(&options->Logs, "Log", "notice file /var/log/tor/log");
  29. }
  30. if (options_init_logs(options, 1)<0) /* Validate the log(s) */