[Rt-commit] rt branch, 4.4/prompt-for-password-fulltext-index, created. rt-4.4.2-133-g3d4ba479f

Maureen Mirville maureen at bestpractical.com
Thu May 10 17:16:00 EDT 2018


The branch, 4.4/prompt-for-password-fulltext-index has been created
        at  3d4ba479fb15dcadd924343eba33f8643c0965dc (commit)

- Log -----------------------------------------------------------------
commit 3d4ba479fb15dcadd924343eba33f8643c0965dc
Author: Maureen E. Mirville <maureen at bestpractical.com>
Date:   Mon Apr 9 16:15:29 2018 -0400

    Allow rt-setup-fulltext-index to prompt for dba password

diff --git a/sbin/rt-setup-fulltext-index.in b/sbin/rt-setup-fulltext-index.in
index 03863fbfa..8e1192443 100644
--- a/sbin/rt-setup-fulltext-index.in
+++ b/sbin/rt-setup-fulltext-index.in
@@ -49,6 +49,7 @@
 use strict;
 use warnings;
 no warnings 'once';
+use Term::ReadKey;
 
 # fix lib paths, some may be relative
 BEGIN { # BEGIN RT CMD BOILERPLATE
@@ -650,6 +651,17 @@ sub dba_handle {
         $ENV{'NLS_NCHAR'} = "AL32UTF8";
     }
     my $dsn = do { my $h = new RT::Handle; $h->BuildDSN; $h->DSN };
+    my $password;
+    if ( $DB{'admin_password'} || $ENV{'RT_DBA_PASSWORD'} ) {
+        $password = $DB{'admin_password'} || $ENV{'RT_DBA_PASSWORD'};
+    } else {
+        print "Please enter $DB{'type'} admin password: ";
+        ReadMode('noecho');
+        chomp($password = ReadLine(0));
+        ReadMode('normal');
+        print "\n";
+    }
+    $DB{'admin_password'} = $password;
     my $dbh = DBI->connect(
         $dsn, $DB{admin}, $DB{admin_password},
         { RaiseError => 1, PrintError => 1 },

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


More information about the rt-commit mailing list