- @echo "Creating interface for link $(call proj1,$*) on $(call get,$*)"
- @$(SSH) $(HOST_$(call get,$*)) \
- sudo sliver-ovs create-port $$(cat $^) L$(call proj1,$*) > $@ \
- || { rm $@; exit 1; }
-
-cache/link.%: cache/host.$$(call rget,$$*) cache/iface.% cache/iface.$$(call opp,$$*)
- @echo "Setting port number of link $(call proj1,$*) on $(call get,$*)"
- @$(SSH) $(HOST_$(call get,$*)) \
- sudo ovs-vsctl set interface L$(call proj1,$*) \
- options:remote_ip=$$(cat cache/host.$(call rget,$*)) \
- options:remote_port=$$(cat cache/iface.$(call opp,$*)) \
+ @echo "Creating interface for link $(call linkpart,$(*F)) on $(call display,$(call get,$(*F))) - logs in $(call log,$@)"
+ @$(SSH) $(call solve,$(call get,$(*F))) $(SUDO) sliver-ovs create-port $(BRIDGE) \
+ L$(call linkpart,$(*F)) > $@ 2> $(call log,$@) || { rm $@; exit 1; }
+
+
+# linkid=$(call linkpart,%)
+# nodeid=$(call get,%)
+# iface1=cache/iface.%
+# iface2=cache/iface.$(call opp,%)
+cache/link.%: cache/host.$$(call rget,%) cache/iface.% cache/iface.$$(call opp,%)
+ @echo "Setting port number of link $(call linkpart,$(*F)) on $(call display,$(call get,$(*F))) - logs in $(call log,$@)"
+ @$(SSH) $(call solve,$(call get,$(*F))) $(SUDO) sliver-ovs set-remote-endpoint L$(call linkpart,$(*F)) \
+ $$(cat cache/host.$(call rget,$(*F))) \
+ $$(cat cache/iface.$(call opp,$(*F))) 2> $(call log,$@) \