freeside/FS/FS UID.pm,1.23,1.24
ivan
ivan at pouncequick.420.am
Fri Jun 25 03:25:04 PDT 2004
Update of /home/cvs/cvsroot/freeside/FS/FS
In directory pouncequick:/tmp/cvs-serv1045/FS
Modified Files:
UID.pm
Log Message:
ping the database and retry rather before doing anything
Index: UID.pm
===================================================================
RCS file: /home/cvs/cvsroot/freeside/FS/FS/UID.pm,v
retrieving revision 1.23
retrieving revision 1.24
diff -u -d -r1.23 -r1.24
--- UID.pm 26 Sep 2003 09:15:33 -0000 1.23
+++ UID.pm 25 Jun 2004 10:25:02 -0000 1.24
@@ -16,7 +16,7 @@
@ISA = qw(Exporter);
@EXPORT_OK = qw(checkeuid checkruid cgisuidsetup adminsuidsetup forksuidsetup
- getotaker dbh datasrc getsecrets driver_name );
+ getotaker dbh datasrc getsecrets driver_name myconnect );
$freeside_uid = scalar(getpwnam('freeside'));
@@ -84,11 +84,8 @@
$ENV{'BASH_ENV'} = '';
croak "Not running uid freeside!" unless checkeuid();
- getsecrets;
- $dbh = DBI->connect($datasrc,$db_user,$db_pass, {
- 'AutoCommit' => 0,
- 'ChopBlanks' => 1,
- } ) or die "DBI->connect error: $DBI::errstr\n";
+
+ $dbh = &myconnect;
foreach ( keys %callback ) {
&{$callback{$_}};
@@ -98,6 +95,11 @@
&{$_} foreach @callback;
$dbh;
+}
+
+sub myconnect {
+ $dbh = DBI->connect( getsecrets, {'AutoCommit' => 0, 'ChopBlanks' => 1, } )
+ or die "DBI->connect error: $DBI::errstr\n";
}
=item install_callback
More information about the freeside-commits
mailing list