Current-Users archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: sysinst split project - The Configuration File
David Young wrote:
> Use XML for the configuration. That ensures that the configuration is
> queryable/transformable with NetBSD's forthcoming xmltools. I know that
> writing XML by hand is objectionable, so establish a one-to-one mapping
> from your user-friendly format to an XML format. Provide a tool to/from
> the XML format.
I wouldn't recommend XML route. Write a user-friendly lua script
instead. Someone posted an example in some (custom?) config language.
It can be easily transformed to a lua script:
-- Library code
function config(content)
end
function disk1()
end
function disklabel(content)
end
-- User config file
config {
disk1 {
disklabel {
------------------
}
}
}
If one wants arbitrary section names, he or she can implement a function
that returns another function:
function section(name)
return function(content) end
end
section "mysection" {}
Alex
Home |
Main Index |
Thread Index |
Old Index