summaryrefslogtreecommitdiffstats
path: root/config-db
diff options
context:
space:
mode:
authorOliver Tappe2007-09-23 17:28:30 +0200
committerOliver Tappe2007-09-23 17:28:30 +0200
commiteeba2f348e01c41b827ed96a3af0d9282f8e7bc4 (patch)
tree8cb7d642ea61e5dba485f7f6e624de922f9669b7 /config-db
parent* added readPassword() to Utils.pm, a function which fetches a password (diff)
downloadcore-eeba2f348e01c41b827ed96a3af0d9282f8e7bc4.tar.gz
core-eeba2f348e01c41b827ed96a3af0d9282f8e7bc4.tar.xz
core-eeba2f348e01c41b827ed96a3af0d9282f8e7bc4.zip
* now makes use of readPassword() from Utils.pm
git-svn-id: http://svn.openslx.org/svn/openslx/trunk@1343 95ad53e4-c205-0410-b2fa-d234c58c8868
Diffstat (limited to 'config-db')
-rw-r--r--config-db/OpenSLX/MetaDB/mysql.pm7
1 files changed, 2 insertions, 5 deletions
diff --git a/config-db/OpenSLX/MetaDB/mysql.pm b/config-db/OpenSLX/MetaDB/mysql.pm
index 865b035d..6b298bc8 100644
--- a/config-db/OpenSLX/MetaDB/mysql.pm
+++ b/config-db/OpenSLX/MetaDB/mysql.pm
@@ -24,6 +24,7 @@ use base qw(OpenSLX::MetaDB::DBI);
################################################################################
use DBD::mysql;
use OpenSLX::Basics;
+use OpenSLX::Utils;
################################################################################
### implementation
@@ -50,11 +51,7 @@ sub connect ## no critic (ProhibitBuiltinHomonyms)
: (getpwuid($>))[0];
my $dbPasswd = $openslxConfig{'db-passwd'};
if (!defined $dbPasswd) {
- use Term::ReadLine;
- my $term = Term::ReadLine->new('slx');
- my $attribs = $term->Attribs;
- $attribs->{redisplay_function} = $attribs->{shadow_redisplay};
- $dbPasswd = $term->readline("db-password> ");
+ $dbPasswd = readPassword("db-password> ");
}
vlog(1, "trying to connect user '$dbUser' to mysql-database '$dbSpec'");