Changeset 844 for trunk


Ignore:
Timestamp:
04/12/16 18:32:17 (9 years ago)
Author:
Kris Deugau
Message:

/trunk

Add a hack to slurp the DB connect info from MyIPDB.pm in db-update.pl,
so we don't have to maintain the info twice and make a mess of it.

Location:
trunk/cgi-bin
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/cgi-bin/MyIPDB.pm

    r839 r844  
    2222# DB host is optional.
    2323my $dbhost = 'localhost';
     24##fixme:  need better way to export the variables above for db-update
     25sub dbname { $dbname }
     26sub dbuser { $dbuser }
     27sub dbpass { $dbpass }
     28sub dbhost { $dbhost }
    2429
    2530# ACL for RPC shim.  A hash of arrays;  the hash keys are the remote system
  • trunk/cgi-bin/db-update.pl

    r822 r844  
    99
    1010# run the tabledef update first.  This is "safe";  IPDB < 3.0 can still happily munch away at it.
    11 print qx { PGPASSWORD=ipdbpwd psql -h localhost -U ipdb ipdb <ipdb-2.7-3.0.sql };
     11##fixme
     12my $sqlcmd = "PGPASSWORD=".dbpass()." psql -h ".dbhost()." -U ".dbuser()." ".dbname()." <ipdb-2.7-3.0.sql";
     13print qx $sqlcmd;
    1214
    1315my $dbh;
Note: See TracChangeset for help on using the changeset viewer.