diff --git a/gosa-core/setup/class_setupStep_Checks.inc b/gosa-core/setup/class_setupStep_Checks.inc
index 9c32200536cbf2407e696c2fdce39cadb4715ce6..783ba98fd889f2b6c1333ddae5188a3d73860df2 100644 (file)
var $basic_checks = array();
var $config_checks= array();
var $is_writeable = array();
- var $header_image = "images/system.png";
+ var $header_image = "images/setup/system.png";
+
+ var $b_displayCheckbutton = TRUE;
function Step_Checks()
{
$this->basic_checks[] = array("NAME" => $N , "DESC" => $D , "RESULT" => $R , "SOLUTION" => $S , "MUST" => $M );
/* Check for installed mhash module */
- $N = msgPool::checkingFor("mhash");
- $D = _("GOsa requires this module to make use of SSHA encryption.");
- $S = msgPool::installPhpModule("mhash");
- $R = is_callable("mhash");
+ $N = msgPool::checkingFor("hash method");
+ $D = _("GOsa requires either 'mhash' or the 'sha1' module to make use of SSHA encryption.");
+ $S = msgPool::installPhpModule("mhash/sha1");
+ $R = is_callable('mhash') || is_callable('sha1');
$M = FALSE;
$this->basic_checks[] = array("NAME" => $N , "DESC" => $D , "RESULT" => $R , "SOLUTION" => $S , "MUST" => $M );
/* Is imap module available */
$N = msgPool::checkingFor(_("mbstring"));
- $D = _("GOsa requires this module to handle unicode strings.");
+ $D = _("GOsa requires this module to handle Unicode strings.");
$S = msgPool::installPhpModule("mbstring");
$R = is_callable("mb_strlen");
$M = TRUE;
$this->basic_checks[] = array("NAME" => $N , "DESC" => $D , "RESULT" => $R , "SOLUTION" => $S , "MUST" => $M );
+ /* Is calendar module available/compiled/installed */
+ $N = msgPool::checkingFor(_("Calendar"));
+ $D = _("GOsa requires this module to calculate dates.");
+ $S = msgPool::installPhpModule("calendar");
+ $R = is_callable("cal_days_in_month");
+ $M = TRUE;
+ $this->basic_checks[] = array("NAME" => $N , "DESC" => $D , "RESULT" => $R , "SOLUTION" => $S , "MUST" => $M );
+
/* Mysql module loaded ? */
$N = msgPool::checkingFor(_("MySQL"));
$D = _("GOsa requires this module to communicate with several supported databases.");
$M = TRUE;
$this->basic_checks[] = array("NAME" => $N , "DESC" => $D , "RESULT" => $R , "SOLUTION" => $S , "MUST" => $M );
- /* Checking for Cups module */
- $N = msgPool::checkingFor(_("CUPS"));
- $D = _("GOsa requires this modukle to show printers that are not defined within the LDAP.");
- $S = msgPool::installPhpModule("CUPS");
- $R = is_callable("cups_get_dest_list");
- $M = FALSE;
- $this->basic_checks[] = array("NAME" => $N , "DESC" => $D , "RESULT" => $R , "SOLUTION" => $S , "MUST" => $M );
-
/* Checking generate LM/NT password hashes */
#TODO: either this, or gosa-si will do the hash generation
$query= "mkntpwd 2>&1";
$output= shell_exec ($query);
$have_mkntpwd= preg_match("/^Usage: mkntpwd /", $output);
if (!$have_mkntpwd){
- $query= 'LC_ALL=C LANG=C perl -MCrypt::SmbHash -e "print join(q[:], ntlmgen $ARGV[0]), $/;" &>/dev/null';
+ $query= 'LC_ALL=C LANG=C perl -MCrypt::SmbHash -e "print join(q[:], ntlmgen $ARGV[0]), $/;" >/dev/null';
system ($query, $ret);
$have_mkntpwd |= ($ret == 0);
}
$N = msgPool::checkingFor(_("samba hash generator"));
$D = _("GOsa requires this command to synchronize POSIX and samba passwords.");
- $S = _("Deploy a gosa-si installation or install the perl Crypt::SmbHash modules.");
+ $S = _("Deploy a gosa-si installation or install the Perl Crypt::SmbHash modules.");
$R = $have_mkntpwd;
$M = TRUE;
$this->basic_checks[] = array("NAME" => $N , "DESC" => $D , "RESULT" => $R , "SOLUTION" => $S , "MUST" => $M );
+ /* Read data written by convert */
+ $output= "";
+ $sh= popen("convert", 'r');
+ while (!feof($sh)){
+ $output.= fread($sh, 4096);
+ }
+ pclose($sh);
+
+ $N = msgPool::checkingFor(_("imagick"));
+ $D = _("GOsa requires this extension to handle images.");
+ $S = msgPool::installPhpModule("php5-imagick");
+
+ $IMGVER = phpversion('imagick');
+
+ if ($IMGVER > 1.0) {
+ $R = method_exists('imagick','getImageBlob');
+ }
+ else {
+ $R = is_callable("imagick_blob2image") || !empty($output);
+ }
+
+ $M = TRUE;
+ $this->basic_checks[] = array("NAME" => $N , "DESC" => $D , "RESULT" => $R , "SOLUTION" => $S , "MUST" => $M );
+
+ $N = msgPool::checkingFor(_("compression module"));
+ $D = _("GOsa requires this extension to handle snapshots.");
+ $S = msgPool::installPhpModule("php5-zip / php5-gzip");
+ $R = is_callable("gzcompress");
+ $M = FALSE;
+ $this->basic_checks[] = array("NAME" => $N , "DESC" => $D , "RESULT" => $R , "SOLUTION" => $S , "MUST" => $M );
+
/* PHP Configuration checks */
/* Check if memory limit is set to 32 or > */
$N = "memory_limit >= <b>32</b>";
- $D = _("GOsa needs at least 32MB of memory. Setting it below this limit may cause errors that are not reproducable! Increase it for larger setups.");
+ $D = _("GOsa needs at least 32MB of memory. Setting it below this limit may cause errors that are not reproducible! Increase it for larger setups.");
$S = _("Search for 'memory_limit' in your php.ini and set it to '32M' or higher.");
$R = ini_get('memory_limit') >= 32 ;
$M = TRUE;
*/
/* Check if we can create a config file.*/
- $N = _("Configuration writeable");
+ $N = _("Configuration writable");
$D = _("The configuration file can't be written");
- $S = sprintf(_("GOsa reads its configuration from a file located in (%s/%s). The setup can write the configuration directly if it is writeable."),CONFIG_DIR,CONFIG_FILE);
+ $S = sprintf(_("GOsa reads its configuration from a file located in (%s/%s). The setup can write the configuration directly if it is writable."),CONFIG_DIR,CONFIG_FILE);
$R = ( file_exists(CONFIG_DIR."/".CONFIG_FILE) && is_writeable(CONFIG_DIR."/".CONFIG_FILE)) // is there a config file ?
|| (!file_exists(CONFIG_DIR."/".CONFIG_FILE) && is_writeable(CONFIG_DIR)); // There is non, but can we create a file there ?
$M = FALSE;
$this->is_writeable[] = array("NAME" => $N , "DESC" => $D , "RESULT" => $R , "SOLUTION" => $S , "MUST" => $M );
- /* If we have writeaccess to the config dir, check if there is already a config file */
-# if($R){
-#
-# /* check if there is already a config file. */
-# $N = _("No old configuration file.");
-# $D = "";//_("");
-# $S = _("If there is already a configuration file, this file will be overwritten when GOsa setup finishes. Please move your old config file away.");
-# $R = !file_exists(CONFIG_DIR."/".CONFIG_FILE);
-# $M = FALSE;
-# $this->is_writeable[] = array("NAME" => $N , "DESC" => $D , "RESULT" => $R , "SOLUTION" => $S , "MUST" => $M );
-# }
}