modified default modules, added checks for module properties
This commit is contained in:
parent
b2319c055f
commit
dd5231ca9c
|
@ -155,13 +155,11 @@ class Config {
|
||||||
/** LDAP cache timeout */
|
/** LDAP cache timeout */
|
||||||
var $cachetimeout;
|
var $cachetimeout;
|
||||||
|
|
||||||
/**
|
var $usermodules = "posixAccount,shadowAccount,quota";
|
||||||
* Account modules
|
/** Account modules for groups */
|
||||||
* TODO add default modules for LAM <0.5
|
var $groupmodules = "posixGroup,quota";
|
||||||
*/
|
/** Account modules for hosts */
|
||||||
var $usermodules = "um1,um2,um3";
|
var $hostmodules = "account,sambaSamAccount";
|
||||||
var $groupmodules = "gm1,gm2,gm3";
|
|
||||||
var $hostmodules = "hm1,hm2,hm3";
|
|
||||||
|
|
||||||
/** Name of configuration file */
|
/** Name of configuration file */
|
||||||
var $file;
|
var $file;
|
||||||
|
@ -739,7 +737,9 @@ class Config {
|
||||||
for ($i = 0; $i < sizeof($modules); $i++) {
|
for ($i = 0; $i < sizeof($modules); $i++) {
|
||||||
if (! in_array($modules[$i], $available)) return false;
|
if (! in_array($modules[$i], $available)) return false;
|
||||||
}
|
}
|
||||||
// TODO: check depends/conflicts
|
// check depends/conflicts
|
||||||
|
if (check_module_conflicts($modules, getModulesDependencies('user')) != false) return false;
|
||||||
|
if (check_module_depends($modules, getModulesDependencies('user')) != false) return false;
|
||||||
$this->usermodules = implode(",", $modules);
|
$this->usermodules = implode(",", $modules);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@ -773,7 +773,9 @@ class Config {
|
||||||
for ($i = 0; $i < sizeof($modules); $i++) {
|
for ($i = 0; $i < sizeof($modules); $i++) {
|
||||||
if (! in_array($modules[$i], $available)) return false;
|
if (! in_array($modules[$i], $available)) return false;
|
||||||
}
|
}
|
||||||
// TODO: check depends/conflicts
|
// check depends/conflicts
|
||||||
|
if (check_module_conflicts($modules, getModulesDependencies('group')) != false) return false;
|
||||||
|
if (check_module_depends($modules, getModulesDependencies('group')) != false) return false;
|
||||||
$this->groupmodules = implode(",", $modules);
|
$this->groupmodules = implode(",", $modules);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@ -807,7 +809,9 @@ class Config {
|
||||||
for ($i = 0; $i < sizeof($modules); $i++) {
|
for ($i = 0; $i < sizeof($modules); $i++) {
|
||||||
if (! in_array($modules[$i], $available)) return false;
|
if (! in_array($modules[$i], $available)) return false;
|
||||||
}
|
}
|
||||||
// TODO: check depends/conflicts
|
// check depends/conflicts
|
||||||
|
if (check_module_conflicts($modules, getModulesDependencies('host')) != false) return false;
|
||||||
|
if (check_module_depends($modules, getModulesDependencies('host')) != false) return false;
|
||||||
$this->hostmodules = implode(",", $modules);
|
$this->hostmodules = implode(",", $modules);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue