libUCL / UCL as FreeBSD config question
Dan Partelly
dan_partelly at rdsor.ro
Wed Nov 18 07:55:59 UTC 2015
Hi all,
is LibUCL able to read in memory a UCL key-value database , modify it in various ways :
1. Add a new key-value pair
2. Modify the value of a value
and serialise the modified database back to disk ?
Or it is designed only a one way / read-only configuration mechanism ?
The reason Im asking is this:
if UCL becomes the new config mechanism of FreeBSD, does it brings any other advantage
than an easy to read and humanly write format ? Would this library/language be usable in
any other way in system configuration — apart from autoexec.bat way —> use command line tool
to read key-vaule , filter it with some tool back to plain **text** and feed it to a command line utility
from FreeBSD base ?
Let’s say one writes a network config daemon to handle network configuration, and expose network
configuration (like interface management, route management, DHCP bindings and so on), which
exposes all this functionality to the rest of the system through IPC. Now, let’s say , a simple client
modifies the IP address of a certain interface, or host name or whatever, and in process modifying the
corresponding key-value in memory, in addition to sending the IOCTL to change ip address for the interface
to the kernel.
Is lib UCL able to serialise this change back to the file which backups up the database ? If it is , all is dandy,
If it is not, is is this feature easy to implement in libUCL , without being a hack, or libUCL design was read only
from start, thing which would make serialisation hard to implement cleanly ?
More information about the freebsd-hackers
mailing list