07_log_to_file_by_default.dpatch 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738
  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.2.0-alpha-cvs/src/or/config.c /tmp/dpep.YwfNhI/tor-0.1.2.0-alpha-cvs/src/or/config.c
  22. --- tor-0.1.2.0-alpha-cvs/src/or/config.c
  23. +++ /tmp/dpep.YwfNhI/tor-0.1.2.0-alpha-cvs/src/or/config.c
  24. @@ -2079,7 +2079,7 @@
  25. /* Special case on first boot if no Log options are given. */
  26. - if (!options->Logs && !options->RunAsDaemon && !from_setconf)
  27. - config_line_append(&options->Logs, "Log", "notice stdout");
  28. + if (!options->Logs && !from_setconf)
  29. + config_line_append(&options->Logs, "Log", "notice file /var/log/tor/log");
  30. if (options_init_logs(options, 1)<0) /* Validate the log(s) */
  31. REJECT("Failed to validate Log options. See logs for details.");