summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorivan <ivan>2008-04-09 21:17:05 +0000
committerivan <ivan>2008-04-09 21:17:05 +0000
commit53aceae6c3023e7971ef80d55e62c47bf09a2092 (patch)
treeaebf9431d92e206e8432111bd6f9dba2e268caf8
parent42ee3cf005e9a89ff260d4c825436d8870bae4a2 (diff)
1.9 bootstrapping: apparantly, we have a dbdef at this point, but its not in the database yet, so checking dbdef->table doesn't DWWW
-rw-r--r--FS/FS/UID.pm9
1 files changed, 6 insertions, 3 deletions
diff --git a/FS/FS/UID.pm b/FS/FS/UID.pm
index bd2b70da2..a94e90f86 100644
--- a/FS/FS/UID.pm
+++ b/FS/FS/UID.pm
@@ -114,10 +114,13 @@ sub forksuidsetup {
warn "$me forksuidsetup deciding upon config system to use\n" if $DEBUG;
- if ( dbdef->table('conf') ) {
+ my $sth = '';
+ if ( dbdef->table('conf')
+ and $sth = $dbh->prepare("SELECT COUNT(*) FROM conf")
+ and $sth->execute
+ )
+ {
- my $sth = $dbh->prepare("SELECT COUNT(*) FROM conf") or die $dbh->errstr;
- $sth->execute or die $sth->errstr;
my $confcount = $sth->fetchrow_arrayref->[0];
if ($confcount) {