mirror of
https://github.com/kernelkit/infix.git
synced 2026-08-03 06:13:02 +02:00
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>
27 lines
957 B
Makefile
27 lines
957 B
Makefile
################################################################################
|
|
#
|
|
# confd
|
|
#
|
|
################################################################################
|
|
|
|
CONFD_VERSION = 1.0
|
|
CONFD_LICENSE = BSD-3-Clause
|
|
CONFD_SITE_METHOD = local
|
|
CONFD_SITE = $(BR2_EXTERNAL_INFIX_PATH)/src/confd
|
|
CONFD_DEPENDENCIES = augeas sysrepo
|
|
CONFD_AUTORECONF = YES
|
|
|
|
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/
|
|
endef
|
|
CONFD_TARGET_FINALIZE_HOOKS += CONFD_INSTALL_EXTRA
|
|
|
|
$(eval $(autotools-package))
|