Sure thing.  This is what sub new() looks like in my Lib.pm:

sub new
{
     my $class = shift;
     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 = 1;
     my $paths;

     #
     # Set defaults for $topDir and $installDir.
     #
     $topDir     = '/data' 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,
             InstallDir => $installDir,
             ConfDir    => $confDir eq "" ? '/etc/BackupPC' : $confDir,
             LogDir     => '/var/log/BackupPC',
         };
     } else {
         $paths = {
             useFHS     => $useFHS,
             TopDir     => $topDir,
             InstallDir => $installDir,
             ConfDir    => $confDir eq "" ? "$topDir/conf" : $confDir,
             LogDir     => "$topDir/log",
         };
     }


Also, I wound up cheating a bit, and did a symlink from 
/usr/local/etc/BackupPC (correct for FreeBSD from ports) to 
/etc/BackupPC.  Originally I was having to either patch every call of 
new() to be new(undef,undef,'/usr/local/etc/BackupPC',undef);, or in the 
above line that reads:

    my($topDir, $installDir, $confDir, $noUserCheck) = @_;

Somehow force that third value to be my real config directory.  The 
problem I ran into is that if I don't trigger useFHS, then it broke 
convention by wanting the config directory to be $topDir/conf, which is 
still wrong.  So...I cheated. :P  I need to not cheat though, because 
this is just far outside of FreeBSD convention.  I *should* be able to 
share out /usr/local and have it work on another box just fine, and that 
isn't the case here.

Anyhoo...I tend to think we have at very least a bug in configure.pl, 
but moreover we need to be a bit more flexible on being able to define 
confDir.  As was mentioned before, having the option to pass it on the 
command line would clear this right up.


Tony Shadwick
OSS Solutions


Nils Breunese (Lemonbit) wrote:
> Randy Barlow wrote:
> 
>> Tony Shadwick wrote:
>>
>>> We need to get this worked out though.  To be this close to having a
>>> proper installer and stuck on this silly detail....tsk. :P
>>
>> Yes sir :)  I prefer not to install things outside of my packager :)
> 
> I also prefer not to install software from source, but BackupPC is so 
> great that I gladly made an exception. If anyone knows of a repository 
> packaging BackupPC for RHEL/CentOS that'd be great. Maybe rpmforge, EPEL 
> or centos.karan.org would be willing to package BackupPC. I'm not an rpm 
> packaging guru however, so I'll just keep installing from source for now.
> 
> Nils Breunese.
> 
> 
> 
> ------------------------------------------------------------------------
> 
> -------------------------------------------------------------------------
> This SF.net email is sponsored by DB2 Express
> Download DB2 Express C - the FREE version of DB2 express and take
> control of your XML. No limits. Just data. Click to get it now.
> http://sourceforge.net/powerbar/db2/
> 
> 
> ------------------------------------------------------------------------
> 
> _______________________________________________
> BackupPC-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/backuppc-users
> http://backuppc.sourceforge.net/

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
BackupPC-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/backuppc-users
http://backuppc.sourceforge.net/

Reply via email to