[Rt-commit] rt branch, 4.2/store-dba-name, updated. rt-4.1.5-150-gd7529a3

Alex Vandiver alexmv at bestpractical.com
Mon Dec 24 15:36:00 EST 2012


The branch, 4.2/store-dba-name has been updated
       via  d7529a300562e3f7e082bb3c971ac436a0892fba (commit)
      from  0dfa5b9c6e36baa974620cc354e57677f670ef0d (commit)

Summary of changes:
 sbin/rt-setup-database.in       | 6 ++----
 sbin/rt-setup-fulltext-index.in | 2 +-
 2 files changed, 3 insertions(+), 5 deletions(-)

- Log -----------------------------------------------------------------
commit d7529a300562e3f7e082bb3c971ac436a0892fba
Author: Alex Vandiver <alexmv at bestpractical.com>
Date:   Mon Dec 24 15:30:52 2012 -0500

    Use RT_Config/RT_SiteConfig value for DBA, not configure-time value
    
    This is purely for consistency.  For most cases, DatabaseAdmin in
    RT_Config will be what was just installed using 'make upgrade', which
    was what was configured via './configure' -- and as such this is no
    change.
    
    In the case that the user has configured a different value in
    RT_SiteConfig, it will use that value.  While odd, this is at least
    consistent with all other configure-time values, which are only pushed
    into RT_Config.pm, and read via RT->Config->Get(...) in sbin/ files (not
    hard-coded via @FOO@ configure-time substitution).

diff --git a/sbin/rt-setup-database.in b/sbin/rt-setup-database.in
index 503a74a..f0afd08 100644
--- a/sbin/rt-setup-database.in
+++ b/sbin/rt-setup-database.in
@@ -73,9 +73,7 @@ use Getopt::Long;
 
 $| = 1; # unbuffer all output.
 
-my %args = (
-    dba => '@DB_DBA@',
-);
+my %args;
 GetOptions(
     \%args,
     'action=s',
@@ -169,7 +167,7 @@ if ( $db_type eq 'SQLite' && !File::Spec->file_name_is_absolute($db_name) ) {
     RT->Config->Set( DatabaseName => $db_name );
 }
 
-my $dba_user = $args{'dba'} || $ENV{'RT_DBA_USER'} || $db_user || '';
+my $dba_user = $args{'dba'} || $ENV{'RT_DBA_USER'} || RT->Config->Get('DatabaseAdmin') || '';
 my $dba_pass = $args{'dba-password'} || $ENV{'RT_DBA_PASSWORD'};
 
 if ($args{'skip-create'}) {
diff --git a/sbin/rt-setup-fulltext-index.in b/sbin/rt-setup-fulltext-index.in
index d8fbbc1..bab61f6 100644
--- a/sbin/rt-setup-fulltext-index.in
+++ b/sbin/rt-setup-fulltext-index.in
@@ -77,7 +77,7 @@ use RT::Interface::CLI ();
 my %DB = (
     type           => scalar RT->Config->Get('DatabaseType'),
     user           => scalar RT->Config->Get('DatabaseUser'),
-    admin          => '@DB_DBA@',
+    admin          => scalar RT->Config->Get('DatabaseAdmin'),
     admin_password => undef,
 );
 

-----------------------------------------------------------------------


More information about the Rt-commit mailing list