I started with the Ubuntu backuppc package that is based on "3.0.0".
Once I was convinced that BackupPC was the way to go I downloaded and
installed the "3.1.0" and ran the configure.  Script executed without
issue, but then BackupPC failed to start (complained about missing
config.pl).  I originally solved the issue with a softlink from
/var/lib/backuppc/conf to /etc/backuppc.

Upon reading the source I found the magic variable $useFHS, which was
set to 0.  It was immediately obvious that I needed it set to 1, so I
created this patch to make useFHS do the right thing:

--- Lib.pm      2008-07-22 13:12:31.000000000 -0400
+++ Lib.pm.orig 2008-07-22 13:11:22.000000000 -0400
@@ -110,7 +110,6 @@
     # If set, text config files are below /etc/BackupPC.
     #
     my $useFHS = 0;
-    $useFHS = 1 if -d '/etc/backuppc'; ## default to FHS
     my $paths;

     #

I then looked at the configure.pl from the install package and found
that it set $useFHS to 1 when it detected a "/etc/BackupPC" directory.
 It's my guess that at one point this was the naming for the directory
and it underwent a rename.  Here is a patch for  the configure.pl
script, but the patch is untested as I don't have a development
environment at this time.

--- configure.pl        Tue Jul 22 13:36:23 2008
+++ configure.pl.orig   Tue Jul 22 13:30:36 2008
@@ -143,11 +143,11 @@
 #    InstallDir   which includes subdirs bin, lib, doc
 #
 # With FHS enabled (which is the default for new installations)
-# the config files move to /etc/backuppc and log files to /var/log:
+# the config files move to /etc/BackupPC and log files to /var/log:
 #
-#    /etc/backuppc/config.pl  main config file (was $TopDir/conf/config.pl)
-#    /etc/backuppc/hosts      hosts file (was $TopDir/conf/hosts)
-#    /etc/backuppc/pc/HOST.pl per-pc config file (was
$TopDir/pc/HOST/config.pl)
+#    /etc/BackupPC/config.pl  main config file (was $TopDir/conf/config.pl)
+#    /etc/BackupPC/hosts      hosts file (was $TopDir/conf/hosts)
+#    /etc/BackupPC/pc/HOST.pl per-pc config file (was
$TopDir/pc/HOST/config.pl)
 #    /var/log/BackupPC        log files (was $TopDir/log)
 #    /var/log/BackupPC        Pid, status and email info (was $TopDir/log)
 #
@@ -159,12 +159,12 @@
 my $ConfigPath = "";
 my $ConfigFileOK = 1;
 while ( 1 ) {
-    if ( $ConfigFileOK && -f "/etc/backuppc/config.pl" ) {
-        $ConfigPath = "/etc/backuppc/config.pl";
+    if ( $ConfigFileOK && -f "/etc/BackupPC/config.pl" ) {
+        $ConfigPath = "/etc/BackupPC/config.pl";
         $opts{fhs} = 1 if ( !defined($opts{fhs}) );
         print <<EOF;

-Found /etc/backuppc/config.pl, so this is an upgrade of an
+Found /etc/BackupPC/config.pl, so this is an upgrade of an
 existing BackupPC installation.  We will verify some existing
 information, but you will probably not need to make any
 changes - just hit ENTER to each question.
@@ -174,7 +174,7 @@

 Is this a new installation or upgrade for BackupPC?  If this is
 an upgrade please tell me the full path of the existing BackupPC
-configuration file (eg: /etc/backuppc/config.pl).  Otherwise, just
+configuration file (eg: /etc/BackupPC/config.pl).  Otherwise, just
 hit return.

 EOF
@@ -231,7 +231,7 @@
 #
 if ( $opts{fhs} ) {
     $Conf{TopDir}       ||= "/data/BackupPC";
-    $Conf{ConfDir}      ||= $opts{"config-dir"} || "/etc/backuppc";
+    $Conf{ConfDir}      ||= $opts{"config-dir"} || "/etc/BackupPC";
     $Conf{InstallDir}   ||= "/usr/local/BackupPC";
     $Conf{LogDir}       ||= $opts{"log-dir"} || "/var/log/BackupPC";
 }
@@ -1214,7 +1214,7 @@
 =item B<--config-dir CONFIG_DIR>

 Configuration directory for new installations.  Defaults
-to /etc/backuppc with FHS.  Automatically extracted
+to /etc/BackupPC with FHS.  Automatically extracted
 from --config-path for existing installations.

 =item B<--config-path CONFIG_PATH>


-- 
Jonathan Craig

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
BackupPC-devel mailing list
[email protected]
List:    https://lists.sourceforge.net/lists/listinfo/backuppc-devel
Wiki:    http://backuppc.wiki.sourceforge.net
Project: http://backuppc.sourceforge.net/

Reply via email to