mirror of
https://github.com/kernelkit/infix.git
synced 2026-08-06 23:43:20 +02:00
package/confd: support for customer factory startup-config.cfg
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 commit is contained in:
@@ -15,6 +15,8 @@ define CONFD_INSTALL_EXTRA
|
||||
cp $(CONFD_PKGDIR)/sysrepo.conf $(FINIT_D)/available/
|
||||
ln -sf ../available/sysrepo.conf $(FINIT_D)/enabled/sysrepo.conf
|
||||
cp $(CONFD_PKGDIR)/tmpfiles.conf $(TARGET_DIR)/etc/tmpfiles.d/confd.conf
|
||||
mkdir -p $(TARGET_DIR)/usr/share/factory/cfg
|
||||
cp $(CONFD_PKGDIR)/factory.cfg $(TARGET_DIR)/usr/share/factory/cfg/startup-config.cfg
|
||||
mkdir -p $(TARGET_DIR)/lib/infix
|
||||
cp $(CONFD_PKGDIR)/prep-db $(TARGET_DIR)/lib/infix/
|
||||
cp $(CONFD_PKGDIR)/clean-etc $(TARGET_DIR)/lib/infix/
|
||||
|
||||
@@ -0,0 +1,5 @@
|
||||
{
|
||||
"ietf-system:system": {
|
||||
"hostname": "default"
|
||||
}
|
||||
}
|
||||
@@ -1 +1,2 @@
|
||||
d /run/resolvconf/interfaces - - -
|
||||
C /cfg/startup-config.cfg - - -
|
||||
|
||||
Reference in New Issue
Block a user