Changeset 34018 for trunk/tools/regpeek.pl
- Timestamp:
- Jun 15, 2012, 1:21:25 PM (14 years ago)
- File:
-
- 1 edited
-
trunk/tools/regpeek.pl (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/tools/regpeek.pl
r34008 r34018 4 4 use Getopt::Long qw( GetOptions :config auto_help auto_version gnu_getopt ); 5 5 use PS::IPP::Config 1.0.1 qw( :standard ); 6 7 my $ipprc = PS::IPP::Config->new(); # IPP Configuration 8 my $siteConfig = $ipprc->{_siteConfig}; 6 9 7 10 my $dbname = 'gpc1'; … … 66 69 67 70 sub init_gpc_db { 68 ## change to use the site.config setting now, however may want to use replicated scidbs instead 69 my $ipprc = PS::IPP::Config->new(); # IPP Configuration 70 my $siteConfig = $ipprc->{_siteConfig}; 71 ## change to use the siteConfig setting, while readonly probably do not want to use a readonly replicated DB incase it gets behind 71 72 use constant DB_SOCKET => '/var/run/mysqld/mysqld.sock'; 72 # my $dbserver = 'ippdb01';73 my $dbuser = 'ippuser';74 my $dbpass = 'ippuser';73 #my $dbserver = 'ippdb01'; 74 #my $dbuser = 'ippuser'; 75 #my $dbpass = 'ippuser'; 75 76 my $dbserver = metadataLookupStr($siteConfig, 'DBSERVER'); 77 my $dbuser = metadataLookupStr($ipprc->{_siteConfig}, "RO_DBUSER"); 78 my $dbpass = metadataLookupStr($ipprc->{_siteConfig}, "RO_DBPASSWORD"); 76 79 die "database configuration not set up" unless defined($dbserver); 80 die "database configuration not set up" unless defined($dbuser); 81 die "database configuration not set up" unless defined($dbpass); 77 82 $db = DBI->connect("DBI:mysql:database=${dbname};host=${dbserver};" . 78 83 "mysql_socket=" . DB_SOCKET(),
Note:
See TracChangeset
for help on using the changeset viewer.
