controllers: $(CONTROLLERS)
.PHONY: controllers
+del-controllers: $(foreach id,$(ALL_NODE_IDS),del-controller-$(id))
+.PHONY: del-controllers
+
### node-oriented targets
# check ssh connectivity
cache/sshcheck.%: FORCE
@$(SSH) $(HOST_$*) $(SUDO) sliver-ovs stop-db
@rm -f cache/db.$*
+del-controller.%:
+ @echo "Removing controller for $(call display,$*)"
+ @$(SSH) $(HOST_$*) $(SUDO) sliver-ovs del-controller $(BRIDGE)
+ @rm -f cache/controller.$*
+
del-links: $(addprefix U/,$(notdir $(filter-out %.log,$(wildcard L/*))))
del-switchs: $(addprefix del-,$(notdir $(filter-out %.log,$(wildcard cache/switch.*))))
remote-snapshot-links: $(addprefix cache/rsnap.links.,$(CONF_NODE_IDS))
@sort -u /dev/null $^
+### update sliver-ovs
+update: $(addprefix update-,$(CONF_NODE_IDS))
+ @true
+
+update-%: FORCE
+ @[ -n "$(SLIVER_OVS)" ] || { echo "SLIVER_OVS not set" >&2; exit 1; }
+ @[ -f "$(SLIVER_OVS)" ] || { echo "$(SLIVER_OVS) not found" >&2; exit 1; }
+ @echo "Sending $(SLIVER_OVS) to $(call display,$*)"
+ @scp -q $(SLIVER_OVS) $(SLICE)@$(call solve,$*):
+ @$(SSH) $(call solve,$*) $(SUDO) mv $(notdir $(SLIVER_OVS)) /usr/sbin/sliver-ovs
+
.PHONY: remote-snapshot remote-snapshot-ips remote-snapshot-links
cache/rsnap.ip.%:
graph.ps: graph.dot
dot -Tps < $^ > $@
+
####################
# 'virtual' targets in that there's no real file attached
define node_shortcuts