summaryrefslogtreecommitdiff
path: root/trunk/debian/patches/07_log_to_file_by_default.dpatch
diff options
context:
space:
mode:
Diffstat (limited to 'trunk/debian/patches/07_log_to_file_by_default.dpatch')
-rwxr-xr-xtrunk/debian/patches/07_log_to_file_by_default.dpatch18
1 files changed, 12 insertions, 6 deletions
diff --git a/trunk/debian/patches/07_log_to_file_by_default.dpatch b/trunk/debian/patches/07_log_to_file_by_default.dpatch
index c925c5efe0..809c5ddcf3 100755
--- a/trunk/debian/patches/07_log_to_file_by_default.dpatch
+++ b/trunk/debian/patches/07_log_to_file_by_default.dpatch
@@ -23,16 +23,22 @@ esac
exit 0
@DPATCH@
-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
---- 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
-@@ -2079,7 +2079,7 @@
+diff -urNad tor~/src/or/config.c tor/src/or/config.c
+--- tor~/src/or/config.c 2006-07-24 05:15:02.576170550 +0200
++++ tor/src/or/config.c 2006-07-24 05:18:45.286651501 +0200
+@@ -2118,8 +2118,13 @@
+ REJECT("Failed to normalize old Log options. See logs for details.");
/* Special case on first boot if no Log options are given. */
- if (!options->Logs && !options->RunAsDaemon && !from_setconf)
- config_line_append(&options->Logs, "Log", "notice stdout");
-+ if (!options->Logs && !from_setconf)
-+ config_line_append(&options->Logs, "Log", "notice file /var/log/tor/log");
++ if (debian_running_as_debiantor()) {
++ if (!options->Logs && !from_setconf)
++ config_line_append(&options->Logs, "Log", "notice file /var/log/tor/log");
++ } else {
++ if (!options->Logs && !options->RunAsDaemon && !from_setconf)
++ config_line_append(&options->Logs, "Log", "notice stdout");
++ }
if (options_init_logs(options, 1)<0) /* Validate the log(s) */
REJECT("Failed to validate Log options. See logs for details.");