update and change sysrepo persistency

In sysrepo commit c226ab1 (November 2020), some fields in the internal
sysrepo-monitoring module were renamed from pid to cid without a
revision bump of that module. If a post-November sysrepo ever runs on a
system with pre-November YANG module, sysrepo operations fail with this
error:

 Failed to find "cid" as a sibling to "sysrepo-monitoring:datastore".

...and we started hitting just that in our lab. Given that sysrepo
upstream strongly suggests only ever touching the repository content via
`sysrepocfg`, let's make sure that we follow their suggestion and save
data via `sysrepofg -X` and load them via `sysrepocfg -I`.

This required some dance in order to not break Netopeer's
initialization. I split its provisioning setup in two halves, so that it
installs YANG files (and enables all required features) first, then we
can inject the configuration, and then

Right now this means that we regenerate the NETCONF SSH host key during
each and every boot, but that's only a performance penalty since we
immediately overwrite that configuration via the version stored during
last boot. Still, it would be nice to fit that later.

Change-Id: Ib2060ea850d1121d5025183b6c5b17d8962f435b
Bug: https://tree.taiga.io/project/jktjkt-netconf-cli/issue/206
Bug: https://github.com/sysrepo/sysrepo/issues/2280
diff --git a/package/czechlight-cfg-fs/cfg-restore-sysrepo.service b/package/czechlight-cfg-fs/cfg-restore-sysrepo.service
new file mode 100644
index 0000000..c990d56
--- /dev/null
+++ b/package/czechlight-cfg-fs/cfg-restore-sysrepo.service
@@ -0,0 +1,14 @@
+[Unit]
+Description=Restore sysrepo startup datastore from /cfg
+After=netopeer2-install-yang.service czechlight-install-yang.service cfg.mount
+Requires=netopeer2-install-yang.service czechlight-install-yang.service cfg.mount
+Before=netopeer2-setup.service netopeer2.service sysrepo-persistent-cfg.service
+ConditionPathExists=/cfg/sysrepo/startup.json
+
+[Service]
+Type=oneshot
+ExecStart=/bin/sysrepocfg -d startup -f json --import=/cfg/sysrepo/startup.json
+ExecStart=/bin/sysrepocfg -C startup
+
+[Install]
+WantedBy=multi-user.target