clearfog: velia-hardware: support current PCB revision
Change-Id: Ia08a72b3cdaa07cfea27cb927a022eddc8f266ba
Depends-on: https://cesnet-gerrit-czechlight/c/CzechLight/velia/+/3692
Depends-on: https://gerrit.cesnet.cz/c/CzechLight/velia/+/3692
diff --git a/package/velia/velia-hardware.service b/package/velia/velia-hardware-g1.service
similarity index 71%
rename from package/velia/velia-hardware.service
rename to package/velia/velia-hardware-g1.service
index d84140f..52e020f 100644
--- a/package/velia/velia-hardware.service
+++ b/package/velia/velia-hardware-g1.service
@@ -4,7 +4,10 @@
Before=rauc-mark-good.service
PartOf=netopeer2.service
Requires=czechlight-install-yang.service cfg-restore-sysrepo.service
-ConditionKernelCommandLine=czechlight
+ConditionKernelCommandLine=|czechlight=sdn-inline
+ConditionKernelCommandLine=|czechlight=sdn-roadm-add-drop
+ConditionKernelCommandLine=|czechlight=sdn-roadm-coherent-a-d
+ConditionKernelCommandLine=|czechlight=sdn-roadm-line
[Service]
Type=simple
diff --git a/package/velia/velia-hardware.service b/package/velia/velia-hardware-g2.service
similarity index 63%
copy from package/velia/velia-hardware.service
copy to package/velia/velia-hardware-g2.service
index d84140f..9e30f39 100644
--- a/package/velia/velia-hardware.service
+++ b/package/velia/velia-hardware-g2.service
@@ -4,11 +4,15 @@
Before=rauc-mark-good.service
PartOf=netopeer2.service
Requires=czechlight-install-yang.service cfg-restore-sysrepo.service
-ConditionKernelCommandLine=czechlight
+ConditionKernelCommandLine=|czechlight=sdn-inline-g2
+ConditionKernelCommandLine=|czechlight=sdn-roadm-add-drop-g2
+ConditionKernelCommandLine=|czechlight=sdn-roadm-coherent-a-d-g2
+ConditionKernelCommandLine=|czechlight=sdn-roadm-line-g2
+ConditionKernelCommandLine=|czechlight=sdn-roadm-hires-add-drop-g2
[Service]
Type=simple
-ExecStart=/usr/bin/veliad-hardware --log-level=4 --appliance=czechlight-clearfog
+ExecStart=/usr/bin/veliad-hardware --log-level=4 --appliance=czechlight-clearfog-g2
PrivateTmp=yes
PrivateDevices=no
ProtectSystem=yes
diff --git a/package/velia/velia.mk b/package/velia/velia.mk
index a32c38e..232a962 100644
--- a/package/velia/velia.mk
+++ b/package/velia/velia.mk
@@ -21,7 +21,8 @@
$(TARGET_DIR)/usr/share/dbus-1/system.d/
$(call VELIA_PREPARE_SERVICE,velia-health)
- $(call VELIA_PREPARE_SERVICE,velia-hardware)
+ $(call VELIA_PREPARE_SERVICE,velia-hardware-g1)
+ $(call VELIA_PREPARE_SERVICE,velia-hardware-g2)
$(call VELIA_PREPARE_SERVICE,velia-system)
endef