Date: Wed, 18 Nov 2015 09:55:56 +0200 From: Dan Partelly <dan_partelly@rdsor.ro> To: freebsd-hackers@freebsd.org Subject: libUCL / UCL as FreeBSD config question Message-ID: <5B598F72-C5DD-48FD-866D-F90E117D646E@rdsor.ro>
next in thread | raw e-mail | index | archive | help
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 ?=20= The reason Im asking is this:=20 if UCL becomes the new config mechanism of FreeBSD, does it brings any = other advantage=20 than an easy to read and humanly write format ? Would this = library/language be usable in=20 any other way in system configuration =E2=80=94 apart from autoexec.bat = way =E2=80=94> 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 ?=20 Let=E2=80=99s say one writes a network config daemon to handle network = configuration, and expose network=20 configuration (like interface management, route management, DHCP = bindings and so on), which=20 exposes all this functionality to the rest of the system through IPC. = Now, let=E2=80=99s 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=20 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,=20 If it is not, is is this feature easy to implement in libUCL , without = being a hack, or libUCL design was read only=20 from start, thing which would make serialisation hard to implement = cleanly ?
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?5B598F72-C5DD-48FD-866D-F90E117D646E>