Package: inetsim / 1.3.1+dfsg.1-1

Change-default-paths-for-FHS-compatibility.patch Patch series | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
From: Debian Security Tools <team+pkg-security@tracker.debian.org>
Date: Thu, 29 Aug 2019 10:21:07 +0200
Subject: Change default paths for FHS compatibility

Origin: upstream
Author: Thomas Hungenberg
---
 doc/inetsim.de.pod    | 8 ++++----
 doc/inetsim.en.pod    | 8 ++++----
 lib/INetSim/Config.pm | 8 ++++----
 3 files changed, 12 insertions(+), 12 deletions(-)

diff --git a/doc/inetsim.de.pod b/doc/inetsim.de.pod
index 86c69a7..38a585e 100644
--- a/doc/inetsim.de.pod
+++ b/doc/inetsim.de.pod
@@ -37,7 +37,7 @@ I<DNS>, I<HTTP>, I<SMTP> oder I<POP3>.
 =item B<--config> <I<Konfigurationsdatei>>
 
 Angabe einer alternativen Konfigurationsdatei.
-Standard ist conf/inetsim.conf im aktuellen Verzeichnis.
+Standard ist /etc/inetsim/inetsim.conf.
 
 =item B<--version>
 
@@ -46,17 +46,17 @@ Ausgabe der Versionsinformation.
 =item B<--data-dir> <I<Datenverzeichnis>>
 
 Angabe eines alternativen Datenverzeichnisses.
-Standard ist data/ im aktuellen Verzeichnis.
+Standard ist /var/lib/inetsim/.
 
 =item B<--log-dir> <I<Logverzeichnis>>
 
 Angabe eines alternativen Logverzeichnisses.
-Standard ist log/ im aktuellen Verzeichnis.
+Standard ist /var/log/inetsim/.
 
 =item B<--report-dir> <I<Reportverzeichnis>>
 
 Angabe eines alternativen Reportverzeichnisses.
-Standard ist report/ im aktuellen Verzeichnis.
+Standard ist /var/log/inetsim/report/.
 
 =item B<--bind-address> <I<IP-Adresse>>
 
diff --git a/doc/inetsim.en.pod b/doc/inetsim.en.pod
index a1d2409..3968b8a 100644
--- a/doc/inetsim.en.pod
+++ b/doc/inetsim.en.pod
@@ -36,7 +36,7 @@ I<DNS>, I<HTTP>, I<SMTP> or I<POP3>.
 
 =item B<--config> <I<configuration file>>
 
-The configuration file to use, default is conf/inetsim.conf in the current directory.
+The configuration file to use, default is /etc/inetsim/inetsim.conf.
 
 =item B<--version>
 
@@ -44,15 +44,15 @@ Output version information.
 
 =item B<--data-dir> <I<data directory>>
 
-The data directory to use, default is data/ in the current directory.
+The data directory to use, default is /var/lib/inetsim/.
 
 =item B<--log-dir> <I<log directory>>
 
-The log directory to use, default is log/ in the current directory.
+The log directory to use, default is /var/log/inetsim/.
 
 =item B<--report-dir> <I<report directory>>
 
-The report directory to use, default is report/ in the current directory.
+The report directory to use, default is /var/log/inetsim/report/.
 
 =item B<--bind-address> <I<IP address>>
 
diff --git a/lib/INetSim/Config.pm b/lib/INetSim/Config.pm
index db995b0..89ee3b9 100644
--- a/lib/INetSim/Config.pm
+++ b/lib/INetSim/Config.pm
@@ -30,9 +30,9 @@ my $SSL = (! $@) ? 1 : 0;
 # set BaseDir to current working directory
 my $currentdir = cwd();
 $currentdir =~ /\A(.*)\z/; # evil untaint!
-my $logdir = $currentdir . "/log/";
-my $datadir = $currentdir . "/data/";
-my $reportdir = $currentdir . "/report/";
+my $logdir = "/var/log/inetsim/";
+my $datadir = "/var/lib/inetsim/";
+my $reportdir = "/var/log/inetsim/report/";
 
 #############################################################
 # Configuration Options
@@ -47,7 +47,7 @@ tie %ConfigOptions, 'IPC::Shareable', "CNFG", { %shareopts } or die "unable to t
         MainLogfileName => $logdir . "main.log",
         SubLogfileName => $logdir . "service.log",
         DebugLogfileName => $logdir . "debug.log",
-        ConfigFileName => $currentdir . "/conf/inetsim.conf",
+        ConfigFileName => "/etc/inetsim/inetsim.conf",
         DataDir => $datadir,
         CertDir => $datadir . "certs/",
         ReportDir => $reportdir,