take only the first address returned by host
authorGiuseppe Lettieri <g.lettieri@iet.unipi.it>
Sun, 18 Aug 2013 09:00:58 +0000 (11:00 +0200)
committerGiuseppe Lettieri <g.lettieri@iet.unipi.it>
Sun, 18 Aug 2013 09:00:58 +0000 (11:00 +0200)
planetlab/exp-tool/Makefile

index ef48321..9b36471 100644 (file)
@@ -173,7 +173,7 @@ cache/status.%: FORCE
 
 cache/host.%:
        @echo "IP lookup for $(call display,$*)"
-       @host $(HOST_$*) | sed -n 's/^.*has address *//p' > $@
+       @host $(HOST_$*) | sed -n '/^.*has address */{s///p;q}' > $@
 
 cache/db.%:
        @echo "Starting db server on $(call display,$*) - logs in $(call log,$@)"