1
# See bottom of file for license and copyright information
2
package Foswiki::Configure::Checkers::SafeEnvPath;
3
use base 'Foswiki::Configure::Checker';
7
use Foswiki::Configure::Checker;
9
# Unix or Linux, Windows ActiveState Perl, using PERL5SHELL set to cygwin shell
11
# ensure diff and shell (Bourne or bash type) are found on
13
# Windows ActiveState Perl, using DOS shell
15
# The Windows system directory (e.g. c:\winnt\system32) is required.
16
# Use '\' not '/' in pathnames.
19
# The Windows system directory (e.g. /cygdrive/c/winnt/system32) is required.
20
# Use '/' not '\' in pathnames.
25
unless ( $Foswiki::cfg{SafeEnvPath} ) {
26
return $this->WARN("You should set a value for this path.");
31
# First, get the proposed path
33
if ( $Foswiki::cfg{DetailedOS} eq 'MSWin32' ) {
35
# Active State perl, probably. Need DOS paths.
36
@dirs = split( ';', $Foswiki::cfg{SafeEnvPath} );
39
@dirs = split( ':', $Foswiki::cfg{SafeEnvPath} );
44
foreach my $dir (@dirs) {
49
$check .= $this->WARN("$dir could not be found");
52
if ( $Foswiki::cfg{DetailedOS} eq 'MSWin32' && !$found ) {
53
$check .= $this->ERROR(
54
"None of the directories on the path could be found. This path will almost certainly not work on Windows. Normally the minimum acceptable {SafeEnvPath} is C:\\WINDOWS\\System32 (or the equivalent on your system)."
63
# Foswiki - The Free and Open Source Wiki, http://foswiki.org/
65
# Copyright (C) 2008 Foswiki Contributors. All Rights Reserved.
66
# Foswiki Contributors are listed in the AUTHORS file in the root
67
# of this distribution. NOTE: Please extend that file, not this notice.
69
# Additional copyrights apply to some or all of the code in this
72
# Copyright (C) 2000-2006 TWiki Contributors. All Rights Reserved.
73
# TWiki Contributors are listed in the AUTHORS file in the root
74
# of this distribution. NOTE: Please extend that file, not this notice.
76
# This program is free software; you can redistribute it and/or
77
# modify it under the terms of the GNU General Public License
78
# as published by the Free Software Foundation; either version 2
79
# of the License, or (at your option) any later version. For
80
# more details read LICENSE in the root of this distribution.
82
# This program is distributed in the hope that it will be useful,
83
# but WITHOUT ANY WARRANTY; without even the implied warranty of
84
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
86
# As per the GPL, removal of this notice is prohibited.