diff -r dd568f2909e3 -r 04fa36f93e3a install/index.php --- a/install/index.php Fri May 09 14:54:59 2008 +0000 +++ b/install/index.php Fri May 09 15:41:02 2008 +0000 @@ -1,5 +1,13 @@ "; - echo "

" . _('We have now updated the PowerDNS database to work with Poweradmin. You now want to give limited rights to Poweradmin so it can update the data in the tables. To do this, you should create a new user and give it rights to select, delete, insert and update records in the PowerDNS database.') . " "; - if ($db_type=='mysql') { - echo _('In MySQL you should now perform the following command:') . "

"; - echo "

GRANT SELECT, INSERT, UPDATE, DELETE
ON powerdns-database.*
TO 'poweradmin-user'@'localhost'
IDENTIFIED BY 'poweradmin-password';

"; - } elseif ($db_type == 'pgsql') { - echo _('On PgSQL you would use:') . "

"; - echo "

$ createuser poweradmin-user
" . - "Shall the new role be a superuser? (y/n) n
" . - "Shall the new user be allowed to create databases? (y/n) n
" . - "Shall the new user be allowed to create more new users? (y/n) n
" . - "CREATE USER
" . - "$ psql powerdns-database
" . - "psql> GRANT SELECT, INSERT, DELETE, UPDATE
" . - "ON powerdns-database
" . - "TO poweradmin-user;

\n"; - } - echo "

" . _('After you have added the new user, proceed with this installation procedure.') . "

\n"; - echo "
"; - echo ""; - echo ""; - echo ""; - echo ""; - echo ""; - echo ""; - echo "
"; - break; - - case 5: - $step++; - $db_host = $_POST['host']; - $db_name = $_POST['name']; - $db_type = $_POST['type']; - echo "

" . _('Now we will put together the configuration. To do so, the installer needs some details:') . "

\n"; + echo "

" . _('Now we will gather all details for the configuration itself.') . "

\n"; echo "
"; echo " "; echo " "; echo " \n"; echo " \n"; - echo " \n"; + echo " \n"; echo " \n"; echo " \n"; echo " \n"; @@ -209,6 +185,49 @@ echo ""; break; + case 5: + $step++; + $db_user = $_POST['db_user']; + $db_pass = $_POST['db_pass']; + $db_host = $_POST['db_host']; + $db_name = $_POST['db_name']; + $db_type = $_POST['db_type']; + $dns_hostmaster = $_POST['dns_hostmaster']; + $dns_ns1 = $_POST['dns_ns1']; + $dns_ns2 = $_POST['dns_ns2']; + + echo "

" . _('You now want to give limited rights to Poweradmin so it can update the data in the tables. To do this, you should create a new user and give it rights to select, delete, insert and update records in the PowerDNS database.') . " "; + if ($db_type == 'mysql') { + echo _('In MySQL you should now perform the following command:') . "

"; + echo "

GRANT SELECT, INSERT, UPDATE, DELETE
ON " . $db_name . ".*
TO '" . $db_user . "'@'" . $db_host . "'
IDENTIFIED BY '" . $db_pass . "';

"; + } elseif ($db_type == 'pgsql') { + echo _('On PgSQL you would use:') . "

"; + echo "

$ createuser " . $db_user . "
" . + "Shall the new role be a superuser? (y/n) n
" . + "Shall the new user be allowed to create databases? (y/n) n
" . + "Shall the new user be allowed to create more new users? (y/n) n
" . + "CREATE USER
" . + "$ psql " . $db_name . "
" . + "psql> GRANT SELECT, INSERT, DELETE, UPDATE
" . + "ON " . $db_name . "
" . + "TO " . $db_user . ";

\n"; + } + echo "

" . _('After you have added the new user, proceed with this installation procedure.') . "

\n"; + echo ""; + echo ""; + echo ""; + echo ""; + echo ""; + echo ""; + echo ""; + echo ""; + echo ""; + echo ""; + echo ""; + echo ""; + echo ""; + break; + case 6: $step++; $config = "
" . _('Username') . "" . _('The username as created in the previous step.') . "" . _('The username for Poweradmin. This new user will have limited rights only.') . "
" . _('Password') . "