Commit 49ed455a authored by Côme Bernigaud's avatar Côme Bernigaud Committed by Benoit Mortier
Browse files

Fixes: #2311 Fixed fai config default values

parent de8baa48
......@@ -51,11 +51,16 @@ class faiConfig extends simplePlugin
);
$rdns = array('Script', 'Hook', 'Template', 'Variable', 'Profile', 'Package', 'Partition');
foreach ($rdns as $rdn) {
if ($rdn == '') {
$default = 'ou=disk';
} else {
$default = 'ou='.strtolower($rdn).'s';
}
$attrs['main']['attrs'][] = new StringAttribute (
sprintf(_('Fai %s RDN'), strtolower($rdn)),
sprintf(_('Fai %s RDN'), _(strtolower($rdn))),
sprintf(_('Relative branch in which fai %s will be stored'), _(strtolower($rdn).'s')),
'fdFai'.$rdn.'RDN', TRUE,
'ou='.strtolower($rdn)
$default
);
}
return $attrs;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment