X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=planetlab%2Fexp-tool%2FMakefile;h=2f251dff437940cdb35797ff1d0020bdf274d85f;hb=b347f2d4d4d41b2fef36eb7b9f07cd6678eca1af;hp=eac14e234ff99aa9f581da542379b5bea48e35c6;hpb=7934111cdba68dd98c199b1ee23a55935d1572b7;p=sliver-openvswitch.git diff --git a/planetlab/exp-tool/Makefile b/planetlab/exp-tool/Makefile index eac14e234..2f251dff4 100644 --- a/planetlab/exp-tool/Makefile +++ b/planetlab/exp-tool/Makefile @@ -274,6 +274,19 @@ remote-snapshot-ips: $(addprefix cache/rsnap.ip.,$(CONF_NODE_IDS)) remote-snapshot-links: $(addprefix cache/rsnap.links.,$(CONF_NODE_IDS)) @sort -u /dev/null $^ +.PHONY: remote-snapshot remote-snapshot-ips remote-snapshot-links + + +cache/rsnap.ip.%: FORCE + @$(SSH) $(HOST_$*) $(SUDO) \ + sliver-ovs get-local-ip $(BRIDGE) | sed 's/^/IP_$*=/' > $@ \ + || { rm $@; exit 1; } + +cache/rsnap.links.%: FORCE + @$(SSH) $(HOST_$*) $(SUDO) \ + sliver-ovs get-local-links $(BRIDGE) | sed -n 's/^L/LINKS += /p' > $@ \ + || { rm $@; exit 1; } + ### update sliver-ovs update: $(addprefix update-,$(CONF_NODE_IDS)) @true @@ -285,19 +298,6 @@ update-%: FORCE @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.%: - @$(SSH) $(HOST_$*) $(SUDO) ovs-vsctl -- \ - get interface $(BRIDGE) options:local_ip options:local_netmask |\ - sed -n 's|"||g;1h;2{G;s|\(.*\)\n\(.*\)|IP_$* = \2/\1|p}' > $@ || \ - { rm $@; exit 1; } - -cache/rsnap.links.%: - @$(SSH) $(HOST_$*) $(SUDO) ovs-vsctl list-ifaces $(BRIDGE) | \ - sed -n 's/^L/LINKS += /p' > $@ || \ - { rm $@; exit 1; } - .SECONDEXPANSION: # del-iface.-@: