/cfg: config option for persistent storage of sysrepo's data
Change-Id: Ie29c1488f32b1739d2e6a197041de1883f848fe0
diff --git a/package/czechlight-cfg-fs/czechlight-cfg-fs.mk b/package/czechlight-cfg-fs/czechlight-cfg-fs.mk
index 6798e68..9f28965 100644
--- a/package/czechlight-cfg-fs/czechlight-cfg-fs.mk
+++ b/package/czechlight-cfg-fs/czechlight-cfg-fs.mk
@@ -24,6 +24,12 @@
$(BR2_EXTERNAL_CZECHLIGHT_PATH)/package/czechlight-cfg-fs/cfg-restore-etc.service \
$(TARGET_DIR)/usr/lib/systemd/system/cfg-restore-etc.service
ln -sf ../cfg-restore-etc.service $(TARGET_DIR)/usr/lib/systemd/system/local-fs.target.wants/
+ $(ifeq ($(CZECHLIGHT_CFG_FS_PERSIST_SYSREPO),y))
+ $(INSTALL) -D -m 0644 \
+ $(BR2_EXTERNAL_CZECHLIGHT_PATH)/package/czechlight-cfg-fs/sysrepo-persistent-cfg.service \
+ $(TARGET_DIR)/usr/lib/systemd/system/
+ ln -sf ../sysrepo-persistent-cfg.service $(TARGET_DIR)/usr/lib/systemd/system/multi-user.target.wants/
+ $(endif)
endef
$(eval $(generic-package))