Jan Kundrát | ed3c5ff | 2021-01-23 02:05:52 +0100 | [diff] [blame] | 1 | RESET_SYSREPO_INSTALL_TARGET = YES |
| 2 | |
| 3 | define RESET_SYSREPO_PATCH_DEV_SHM |
| 4 | sed -i \ |
| 5 | 's|^#define SR_SHM_DIR .*|#define SR_SHM_DIR "/run/sysrepo"|' \ |
| 6 | $(@D)/src/common.h.in |
| 7 | endef |
| 8 | |
| 9 | SYSREPO_PRE_PATCH_HOOKS += RESET_SYSREPO_PATCH_DEV_SHM |
| 10 | SYSREPO_POST_RSYNC_HOOKS += RESET_SYSREPO_PATCH_DEV_SHM |
| 11 | |
| 12 | define RESET_SYSREPO_INSTALL_TARGET_CMDS |
| 13 | $(INSTALL) -D -m 0644 \ |
| 14 | --target-directory $(TARGET_DIR)/usr/lib/systemd/system/ \ |
| 15 | $(BR2_EXTERNAL_CZECHLIGHT_PATH)/package/reset-sysrepo/run-sysrepo.mount |
| 16 | $(INSTALL) -d -m 0755 $(TARGET_DIR)/usr/lib/systemd/system/run-sysrepo.mount.d/ |
| 17 | for UNIT in \ |
| 18 | cla-sdn-inline.service \ |
| 19 | cla-sdn-roadm-add-drop.service \ |
| 20 | cla-sdn-roadm-coherent-a-d.service \ |
| 21 | cla-sdn-roadm-line.service \ |
| 22 | lldp-systemd-networkd-sysrepo.service \ |
| 23 | netopeer2.service \ |
| 24 | sysrepo-persistent-cfg.service \ |
Tomáš Pecka | 25aae68 | 2021-01-27 14:45:57 +0100 | [diff] [blame] | 25 | velia-system.service \ |
| 26 | velia-hardware.service \ |
Jan Kundrát | ed3c5ff | 2021-01-23 02:05:52 +0100 | [diff] [blame] | 27 | ; do \ |
| 28 | echo "Adding systemd drop-ins $${UNIT} <-> /run/sysrepo"; \ |
| 29 | $(INSTALL) -d -m 0755 $(TARGET_DIR)/usr/lib/systemd/system/$${UNIT}.d/ ; \ |
| 30 | echo -e "[Unit]\nBindsTo=run-sysrepo.mount\nAfter=run-sysrepo.mount\nPartOf=run-sysrepo.mount" \ |
| 31 | > $(TARGET_DIR)/usr/lib/systemd/system/$${UNIT}.d/reset-sysrepo.conf ; \ |
| 32 | echo -e "[Unit]\nPartOf=$${UNIT}" \ |
| 33 | > $(TARGET_DIR)/usr/lib/systemd/system/run-sysrepo.mount.d/$${UNIT}.conf ; \ |
| 34 | done |
| 35 | endef |
| 36 | |
| 37 | $(eval $(generic-package)) |