+ my($topDir, $installDir, $confDir, $noUserCheck) = @_;
+
+ #
+ # Whether to use filesystem hierarchy standard for file layout.
+ # If set, text config files are below /etc/BackupPC.
+ #
+ my $useFHS = 0;
+ my $paths;
+
+ #
+ # Set defaults for $topDir and $installDir.
+ #
+ $topDir = '/tera0/backup/BackupPC' if ( $topDir eq "" );
+ $installDir = '/usr/local/BackupPC' if ( $installDir eq "" );
+
+ #
+ # Pick some initial defaults. For FHS the only critical
+ # path is the ConfDir, since we get everything else out
+ # of the main config file.
+ #
+ if ( $useFHS ) {
+ $paths = {
+ useFHS => $useFHS,
+ TopDir => $topDir,
+ BinDir => "$installDir/bin",
+ LibDir => "$installDir/lib",
+ ConfDir => $confDir eq "" ? '/etc/BackupPC' : $confDir,
+ LogDir => '/var/log/BackupPC',
+ };
+ } else {
+ $paths = {
+ useFHS => $useFHS,
+ TopDir => $topDir,
+ BinDir => "$installDir/bin",
+ LibDir => "$installDir/lib",
+ ConfDir => $confDir eq "" ? "$topDir/conf" : $confDir,
+ LogDir => "$topDir/log",
+ };
+ }