Permalink
Browse files

Item14279: Merge branch 'Release02x01'

  • Loading branch information...
gac410 committed Jan 19, 2017
2 parents dc9eb0e + 92e7fd6 commit 4009a9a894e857b32a8adfad8e1b46181dbcdc1d
Showing with 25 additions and 8 deletions.
  1. +4 −3 core/data/System/CommandAndCGIScripts.txt
  2. +11 −3 core/data/System/InstallationGuide.txt
  3. +10 −2 core/tools/configure
@@ -1,4 +1,4 @@
-%META:TOPICINFO{author="ProjectContributor" date="1483547096" format="1.1" version="1"}%
+%META:TOPICINFO{author="ProjectContributor" date="1484612966" format="1.1" version="1"}%
%META:TOPICPARENT{name="DeveloperDocumentationCategory"}%
%STARTINCLUDE%
---+ CGI and Command Line Scripts
@@ -24,7 +24,7 @@ In the CGI environment parameters are passed to the scripts via the URL and URL
---++++ Command-line
You *must* be have the =bin= directory on the perl path to run the scripts from the command line.
-<div class="foswikiHelp">%T% To avoid issues with file permissions, *run the scripts as the web server user such as =nobody=, ==www-data= or =www=*. %BR%
+<div class="foswikiHelp">%T% To avoid issues with file permissions, *run the scripts as the web server user such as =nobody=, =www-data= or =www=.* %BR%
If running scripts under the control of cron, install the crontab under the
web server user.</div>
@@ -649,10 +649,11 @@ This is a fully functional command line interface to the Foswiki configuration.
=tools/configure [-search] [-getspec] [-getcfg] [-check] [-wizard] [-method] [-save] [-json] [-trace] [-help] [-noprompt] [-expert]=
-Note: if you need to pass in international characters, it needs to be run with the =perl -CA= command argument.
+Note: if you need to pass in international characters, it needs to be run with the =perl -CA= command argument. (=perl -CAS= when running a new configuration bootstrap)
| *Function* | *Usage* |
| Bootstrap a new install without helptext | =tools/configure -save -expert= |
+| Bootstrap an installation containing international characters | =perl -CAS tools/configure -save= |
| Set multiple variables | =tools/configure -save -set {Password}='newadminpassword' -set {WebMasterEmail}='newadmin@yourco.com'= |
| Check a setting or section of settings. | =tools/configure -check Internationalisation= |
| Run a wizard | =tools/configure -wizard Email -method send_test_email= |
@@ -1,4 +1,4 @@
-%META:TOPICINFO{author="ProjectContributor" date="1481826890" format="1.1" version="1"}%
+%META:TOPICINFO{author="ProjectContributor" date="1484611418" format="1.1" version="1"}%
%META:TOPICPARENT{name="AdminDocumentationCategory"}%
<noautolink>
---+!! Installation Guide
@@ -342,6 +342,14 @@ Foswiki 2.0 includes a shell based configuration tool that can be run from a
server command-line login. It will bootstrap the configuration, and prompt
for settings as required. Here is an example of using it for an interactive
command line bootstrap:
+<div class="foswikiHelp">
+*Note*: If any of your configuration settings use utf-8 characters, (eg. &Uuml;nic&ouml;de) be sure to
+run configure with the perl =-CAS= option so that all prompted input is properly encoded.
+<verbatim class='bash'>
+$ perl -CAS tools/configure -save
+</verbatim>
+</div>
+
<verbatim class='bash'>
$ tools/configure -save
@@ -381,13 +389,13 @@ for more information on setting up Foswiki to use shorter script URLs.
It can also be run in a non-interactive mode, for use in automated deployment
systems.
-<verbatim class='bash'>
+<pre class='bash'>
tools/configure -save -noprompt
tools/configure -save -set {DefaultUrlHost}='http://mysite.com'
tools/configure -save -set {ScriptUrlPath}='/bin'
tools/configure -save -set {ScriptUrlPaths}{view}=''
tools/configure -save -set {PubUrlPath}='/pub'
-tools/configure -save -set {Password}='adminpass' </verbatim>
+perl -CA tools/configure -save -set {Password}='&Auml;dm&icirc;nP&auml;ss' </pre>
Any configuration keys may be set using this tool.
View
@@ -241,7 +241,10 @@ sub _prompt {
$reply = '' unless ( defined $reply );
return if ( $opt && $reply eq 'none' );
- eval "\$Foswiki::cfg$keys='$reply'";
+
+ # Add keys to the params to be processed by the Save wizard.
+ # This invokes all needed handlers like ONSAVE vs. modifying the config directly
+ eval "\$params->{set}{'$keys'} = '$reply'";
if ($@) {
print "Failed to set $keys: "
. Foswiki::Configure::Reporter::stripStacktrace($@);
@@ -280,7 +283,9 @@ unless ( $Foswiki::cfg{isVALID} ) {
unless ( $params->{expert} || $params->{noprompt} ) {
# Ask for missing parameters that cannot bootstrap in CLI
- print "** Enter values for critical configuration items.\n";
+ print "\n** Enter values for critical configuration items.\n";
+ print
+"** If any input will use utf-8 data (non-ASCII), run as 'perl -CAS tools/configure ...'\n";
print
"** type a new value or hit return to accept the value in brackets.\n";
}
@@ -343,6 +348,9 @@ unless ( $Foswiki::cfg{isVALID} ) {
}
}
+else {
+ print "** Be sure to run as 'perl -CA tools/configure' if any settings will use utf-8 data\n";
+}
if ( $reporter->has_level('errors') ) {
exit 1;

0 comments on commit 4009a9a

Please sign in to comment.