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"|' \ |
Václav Kubernát | 8cd6156 | 2021-12-08 13:27:31 +0100 | [diff] [blame] | 6 | $(@D)/src/config.h.in |
Jan Kundrát | ed3c5ff | 2021-01-23 02:05:52 +0100 | [diff] [blame] | 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 \ |
Jan Kundrát | f25a84f | 2021-03-21 13:18:47 +0100 | [diff] [blame] | 21 | cla-sdn-roadm-hires-drop.service \ |
Jan Kundrát | ed3c5ff | 2021-01-23 02:05:52 +0100 | [diff] [blame] | 22 | cla-sdn-roadm-line.service \ |
Jan Kundrát | ed3c5ff | 2021-01-23 02:05:52 +0100 | [diff] [blame] | 23 | netopeer2.service \ |
| 24 | sysrepo-persistent-cfg.service \ |
Václav Kubernát | e6ecb9b | 2021-02-09 20:53:44 +0100 | [diff] [blame] | 25 | nacm-restore.service \ |
Václav Kubernát | 22e240c | 2021-02-04 10:14:19 +0100 | [diff] [blame] | 26 | velia-firewall.service \ |
Tomáš Pecka | 25aae68 | 2021-01-27 14:45:57 +0100 | [diff] [blame] | 27 | velia-system.service \ |
Jan Kundrát | 811c0b0 | 2021-02-05 19:16:43 +0100 | [diff] [blame] | 28 | velia-hardware-g1.service \ |
| 29 | velia-hardware-g2.service \ |
Jan Kundrát | b41f008 | 2021-03-09 22:20:35 +0100 | [diff] [blame] | 30 | rousette.service \ |
Jan Kundrát | ed3c5ff | 2021-01-23 02:05:52 +0100 | [diff] [blame] | 31 | ; do \ |
| 32 | echo "Adding systemd drop-ins $${UNIT} <-> /run/sysrepo"; \ |
| 33 | $(INSTALL) -d -m 0755 $(TARGET_DIR)/usr/lib/systemd/system/$${UNIT}.d/ ; \ |
| 34 | echo -e "[Unit]\nBindsTo=run-sysrepo.mount\nAfter=run-sysrepo.mount\nPartOf=run-sysrepo.mount" \ |
| 35 | > $(TARGET_DIR)/usr/lib/systemd/system/$${UNIT}.d/reset-sysrepo.conf ; \ |
| 36 | echo -e "[Unit]\nPartOf=$${UNIT}" \ |
| 37 | > $(TARGET_DIR)/usr/lib/systemd/system/run-sysrepo.mount.d/$${UNIT}.conf ; \ |
| 38 | done |
| 39 | endef |
| 40 | |
| 41 | $(eval $(generic-package)) |