mirror of
https://github.com/Icinga/icinga2.git
synced 2025-07-25 22:54:57 +02:00
parent
71dc682924
commit
da7d04581d
@ -130,8 +130,13 @@ bool ConfigObjectUtility::CreateObject(const Type::Ptr& type, const String& full
|
|||||||
|
|
||||||
path += "/" + EscapeName(fullName) + ".conf";
|
path += "/" + EscapeName(fullName) + ".conf";
|
||||||
|
|
||||||
|
Dictionary::Ptr allAttrs = new Dictionary();
|
||||||
|
attrs->CopyTo(allAttrs);
|
||||||
|
nameParts->CopyTo(allAttrs);
|
||||||
|
allAttrs->Remove("name");
|
||||||
|
|
||||||
ConfigWriter::Ptr cw = new ConfigWriter(path);
|
ConfigWriter::Ptr cw = new ConfigWriter(path);
|
||||||
cw->EmitConfigItem(type->GetName(), name, false, templates, attrs);
|
cw->EmitConfigItem(type->GetName(), name, false, templates, allAttrs);
|
||||||
cw->EmitRaw("\n");
|
cw->EmitRaw("\n");
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user