# HG changeset patch # User rejo # Date 1210347662 0 # Node ID 04fa36f93e3a99dcaea8c6ed0ee4e5dcd0fc1e6d # Parent dd568f2909e32d72cbee2e239b4a7e38b3ac8b3d [feladat @ 262] Re-ordering of some of the questions in the installer script. The user is now presented the exact commands to create the Poweradmin database user, instead of giving a mock-up. diff -r dd568f2909e3 -r 04fa36f93e3a docs/i18n-template-php.pot --- a/docs/i18n-template-php.pot Fri May 09 14:54:59 2008 +0000 +++ b/docs/i18n-template-php.pot Fri May 09 15:41:02 2008 +0000 @@ -800,7 +800,7 @@ msgstr "" #: index.php:111 -msgid "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." +msgid "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." msgstr "" #: index.php:113 @@ -816,11 +816,11 @@ msgstr "" #: index.php:142 -msgid "Now we will put together the configuration. To do so, the installer needs some details:" +msgid "Now we will gather all details for the configuration itself." msgstr "" #: index.php:148 -msgid "The username as created in the previous step." +msgid "The username for Poweradmin. This new user will have limited rights only." msgstr "" #: index.php:156 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') . "