# rget(x-y@2) = x
rget=$(call get,$(call opp,$(1)))
- SSH_OPTIONS ?= $(SSH_KEY_OPTION) -l $(SLICE)
+solve=$(HOST_$(1))
+# can be redefined in conf.mk if that's not the expected behaviour
+display?=host $(1) aka $(call solve,$(1))
+
+#################### set variables after conf.mk
+ifeq "$(SSH_KEY)" ""
+SSH_KEY_OPTION ?=
+else
+SSH_KEY_OPTION ?= -i $(SSH_KEY)
+endif
+
++SSH_OPTIONS ?= $(SSH_KEY_OPTION) -l $(SLICE) -t
+SSH = ssh $(SSH_OPTIONS)
+
+ALL_NODE_IDS=$(shell (cut -d- -f1 < links; cut -d- -f2 < links) | sort -u)
+
+####################
+all+init: init all
+init:
+ @[ -d L ] || ( echo Creating tmp dir L; mkdir L)
+ @[ -d U ] || ( echo Creating tmp dir U; mkdir U)
+ @[ -d cache ] || ( echo Creating tmp dir cache; mkdir cache)
+.PHONY: all+init init
+
+FORCE:
.SECONDARY:
@host $(HOST_$*) | sed -n 's/^.*has address *//p' > $@
cache/db.%:
- @echo "Starting db server on host $*"
- @ssh -t -l $(SLICE) $(HOST_$*) \
- sudo start_ovsdb-server > $@ \
++<<<<<<< HEAD
+ @echo "Starting db server on $(call display,$*)"
+ @$(SSH) $(HOST_$*) sudo start_ovsdb-server > $@ \
|| { rm $@; exit 1; }
cache/switchd.%: cache/db.%