Declare deviation for /ietf-system:system/clock/timezone-utc-offset,
which we currently do not support.
Please note, when setting out to add support for timezone-utc-offset,
you need to ensure the user does not input both, that should be a
validation error. It's an either-or thing.
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
How to verify, use the following command and paste the XML below:
$ sysrepocfg -R
<sys:set-current-datetime xmlns:sys="urn:ietf:params:xml:ns:yang:ietf-system">
<sys:current-datetime>2022-01-12T14:29:00-02:00</sys:current-datetime>
</sys:set-current-datetime>
Reuse code from mech, verified and working.
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
When researching the systemd tmpfiles.d implementation I discovered the
effort to standarize on /usr/share/factory as a generic factory defaults
for Linux systems. This patch adds a small example factory.cfg file
that is installed as /usr/share/factory/cfg/startup-config.cfg. The
tmpfiles.d backend will then install it as /cfg/startup-config.cfg if
that file is missing at boot. Confd does the rest to bootstrap our
(by default) empty sysrepo db with this startup-config.
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
This change adds a hook to the startup datastore, we use the ietf-system
module because the module argument is mandatory. The hook runs when all
changes have been saved to the internal store. Since sysrepo has many
startup files in /etc/sysrepo, we saving a JSON copy of all these files
in /cfg/startup-config.cfg, which is persistent. On system bootstrap
this file is merged into the (empty) running datastore, which is what
the sysrepo maintainers recommend to be independent of any yang model
updates that might occur on image upgrades.
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
- Call external programs safely with run()
- Use augeas to update /etc/hostname and /etc/hosts
- Add support for generating /etc/chrony.conf
- Update license copyright due to significant contrib.
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
The default is to use -d (debug), which changes logging to stdout, which
we do not want with Finit.
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
Infix integration of klish and klish-plugin-sysrepo.
Initially we add:
More flexible management of running vs. startup: Instead of always
committing changes both to running and startup, commit only modifies
running. To persist changes to startup, the copy command is
introduced. This lets the user copy from factory/startup/running to
startup/running at any time.
Well-known verbs like abort, leave, end, etc.
Drop the shortname yang aliases, installed they become copies of
their versioned counterpart, which is not the intention, but also,
no other yang consumer does this.
We'd like to use ly_ctx_load_module() directly, or a slim sysrepo
wrapper of the same, but no such API (load by yang module *name*
with optional revision) exists currently.
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
Extended evaluation of sysrepo due to problems parsing yang v1.1 models
with the built-in yang parser in Clixon. Problems not seen with libyang
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
Changes compared to original project:
- installs into the sysrepo-plugind plugin directory, so no need
for calling sysrepoctl to load the plugin
- the plugin loads its yang module, so no need for calling sysrepoctl
to load the module before starting sysrepo-plugind
- bug fix ERROR() macro
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
This commit adds multi-nameserver support using openresolv (resolvconf)
and dnsmasq. This means that a DHCP client (dhcpcd) or VPN client can
be providers of nameservers to the system. Dnsmasq takes over as the
system resolver, except when the user has set up static configuration.
Static nameserver(s), as well as search and options, are always added
first by openresolv to /etc/resolv.conf.
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>