[freeside-commits] freeside/bin dbdef-create, 1.10,
1.11 mapsecrets2access_user, 1.4, 1.5
Ivan,,,
ivan at wavetail.420.am
Thu Dec 14 01:27:28 PST 2006
Update of /home/cvs/cvsroot/freeside/bin
In directory wavetail:/tmp/cvs-serv19347/bin
Modified Files:
dbdef-create mapsecrets2access_user
Log Message:
make the config directory configurable
Index: dbdef-create
===================================================================
RCS file: /home/cvs/cvsroot/freeside/bin/dbdef-create,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -d -r1.10 -r1.11
--- dbdef-create 3 Sep 2006 03:14:02 -0000 1.10
+++ dbdef-create 14 Dec 2006 09:27:26 -0000 1.11
@@ -13,7 +13,7 @@
my($dbh)=adminsuidsetup $user;
#needs to match FS::Record
-my($dbdef_file) = "/usr/local/etc/freeside/dbdef.". datasrc;
+my($dbdef_file) = "%%%FREESIDE_CONF%%%/dbdef.". datasrc;
my $dbdef = new_native DBIx::DBSchema $dbh;
Index: mapsecrets2access_user
===================================================================
RCS file: /home/cvs/cvsroot/freeside/bin/mapsecrets2access_user,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- mapsecrets2access_user 30 Aug 2006 16:24:13 -0000 1.4
+++ mapsecrets2access_user 14 Dec 2006 09:27:26 -0000 1.5
@@ -46,8 +46,10 @@
}
my $supergroupnum = $supergroup->groupnum;
-my $mapsecrets = '/usr/local/etc/freeside/mapsecrets';
-open(MAPSECRETS, "<$mapsecrets") or die $!;
+my $conf = new FS::Conf;
+my $dir = $conf->base_dir;
+my $mapsecrets = "$dir/mapsecrets";
+open(MAPSECRETS, "<$mapsecrets") or die "Can't open $mapsecrets: $!";
while (<MAPSECRETS>) {
/([\w]+)\s+secrets\s*$/ or die "unparsable line in mapsecrets: $_";
my $username = $1;
More information about the freeside-commits
mailing list