Setting tag sliver-openvswitch-2.2.90-1
[sliver-openvswitch.git] / planetlab / exp-tool / Makefile
index ef48321..ad56acc 100644 (file)
@@ -172,8 +172,8 @@ cache/status.%: FORCE
        @$(SSH) $(HOST_$*) $(SUDO) sliver-ovs status ||:
 
 cache/host.%:
-       @echo "IP lookup for $(call display,$*)"
-       @host $(HOST_$*) | sed -n 's/^.*has address *//p' > $@
+       @echo "IP lookup for $(call display,$*) - logs in $(call log,$@)"
+       @host $(HOST_$*) | sed -n 's/^.*has address *//p' > $@ 2> $(call log,$@)
 
 cache/db.%:
        @echo "Starting db server on $(call display,$*) - logs in $(call log,$@)"
@@ -486,7 +486,7 @@ cache/geocode.%: cache/loc.% $(CONF)
 
 cache/loc.%: $(CONF)
        @wget -O - 'http://freegeoip.net/csv/$(HOST_$*)' | \
-           awk -F, '{ printf "%s, %s\n", $$8, $$9 }' > $@
+           awk -F'", *"' '{ printf "\"%s\", \"%s\"\n", $$8, $$9 }' > $@
 
 ####################
 # 'virtual' targets in that there's no real file attached
@@ -604,3 +604,13 @@ $(foreach link,$(EXTERNAL_LINKS),cache/endpoint.$(link)@2): cache/endpoint.%@2:
           ./tunproxy -t $$(cat cache/host.$(call leftnode,$*)):$$(cat cache/port.$*@1) \
            -p $(call default,EXTERNAL_PORT,$(call rightnode,$*)) -e -d
 
+# reporting
+.PHONY: report
+report:        
+       @echo SHELL=$(SHELL)
+       @echo "===> Configuration ($(CONF)):"
+       @cat $(CONF)
+       @for f in log/*; do \
+            echo "===> Log file $$(basename $$f):"; \
+            cat $$f; \
+        done