From bf79cbbcad5a334c5a74d760889835f5aa0d7ef3 Mon Sep 17 00:00:00 2001 From: tonnesen Date: Tue, 9 Jul 2002 17:58:56 +0000 Subject: [PATCH] Checks the MySQL root password is correct and allows reentry of password. --- installer.pl | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/installer.pl b/installer.pl index 5796ec3766..496bac112b 100644 --- a/installer.pl +++ b/installer.pl @@ -697,11 +697,17 @@ To allow us to create the koha database please supply the mysql\'s root users password |; -print "Enter mysql\'s root users password: "; -chomp($input = ); - -if ($input) { - $mysqlpass = $input; +my $needpassword=1; +while ($needpassword) { + print "Enter mysql\'s root users password: "; + chomp($input = ); + $mysqlpass = $input; + my $result=system("$mysqldir/bin/mysqladmin -u$mysqluser -p$mysqlpass proc > /dev/null 2>&1"); + if ($result) { + print "\n\nInvalid password for the MySql root user.\n\n"; + } else { + $needpassword=0; + } }