Ver código fonte

getting closer

Andy Baugh 5 anos atrás
pai
commit
37cdbc3a1c
2 arquivos alterados com 3 adições e 4 exclusões
  1. 0 3
      js/pgupgrade.js
  2. 3 1
      lib/Troglodyne/API/Postgres.pm

+ 0 - 3
js/pgupgrade.js

@@ -24,7 +24,6 @@ function doAPIRequestWithCallback (meth, mod, func, handler, errorHandler, args)
     } else if ( meth === 'POST' ) {
         oReq.open( meth, "api.cgi", true );
         oReq.setRequestHeader( "Content-type", "application/x-www-form-urlencoded" );
-        console.log(argstr);
         oReq.send(argstr);
     }
     return false;
@@ -128,11 +127,9 @@ function doInstallScroller (resp) {
 function handlePGInstall (resp) {
     'use strict';
     let obj = safeParseJSON(resp);
-    console.log(resp);
     let upgradeWell = document.getElementById('upgradeWell');
     let submitBtn = document.getElementById('submit');
     if(obj.result === 1) {
-        console.log(obj);
         upgradeWell.textContent += `Attaching to log file ${obj.data.log} from process #${obj.data.pid}...\n\n`;
         doAPIRequestWithCallback( 'GET', 'Postgres', 'get_latest_upgradelog_messages', roadRoller, generalErrorHandler, { "pid": obj.data.pid, "log": obj.data.log, "start": 0 } );
     } else {

+ 3 - 1
lib/Troglodyne/API/Postgres.pm

@@ -138,8 +138,10 @@ sub _real_install {
     {
         local $@;
         eval {
+            # XXX Need to get your locale somehow
+            my $locale = 'en_US.UTF-8';
             my $pants_on_the_ground = Cpanel::AccessIds::ReducedPrivileges->new('postgres');
-            $exit = _saferun( $lh, "/usr/pgsql-$ver2install/bin/initdb", '-D', "/var/lib/pgsql/$ver2install/data/" );
+            $exit = _saferun( $lh, "/usr/pgsql-$ver2install/bin/initdb", '--locale', $locale, '-E', 'UTF8', '-D', "/var/lib/pgsql/$ver2install/data/" );
         };
         $err = $@;
     }