From d455662a02f2a30098ba7aa43c6efe7f7057bbc4 Mon Sep 17 00:00:00 2001 From: "Martine S. Lenders" Date: Tue, 21 Jan 2020 14:59:21 +0100 Subject: [PATCH] dist/testbed-support: Make tmux optional with `iotlab-term` --- dist/testbed-support/Makefile.iotlab | 9 +++++---- dist/testbed-support/README.iotlab.md | 6 ++++-- 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/dist/testbed-support/Makefile.iotlab b/dist/testbed-support/Makefile.iotlab index a3ae3fa042..2071eba2a5 100644 --- a/dist/testbed-support/Makefile.iotlab +++ b/dist/testbed-support/Makefile.iotlab @@ -55,7 +55,8 @@ iotlab-exp: $(IOTLAB_AUTH) all $(Q)iotlab-experiment wait -i $(NEW_ID) ifdef IOTLAB_LOGGING - $(Q)ssh -t $(IOTLAB_AUTHORITY) "tmux new -d -s riot-$(NEW_ID)\ + $(Q)ssh -t $(IOTLAB_AUTHORITY) \ + "$(if $(IOTLAB_TMUX),tmux new -d -s riot-$(NEW_ID),) \ 'script -fac "'"'"serial_aggregator -i $(NEW_ID)"'"'"\ RIOT_LOG-$(IOTLAB_EXP_NAME)-$(NEW_ID)'" endif @@ -85,8 +86,8 @@ iotlab-term: $(IOTLABTERMFLASHDEPS) iotlab-auth -u $(IOTLAB_USER)" $(Q)ssh -t $(IOTLAB_AUTHORITY) \ - "tmux attach -t riot-$(IOTLAB_EXP_ID) || tmux new -s riot-$(IOTLAB_EXP_ID) \ - '$(if $(IOTLAB_LOGGING), \ + "$(if $(IOTLAB_TMUX),tmux attach -t riot-$(IOTLAB_EXP_ID) || tmux new -s riot-$(IOTLAB_EXP_ID) ',) \ + $(if $(IOTLAB_LOGGING), \ script -fac "'"'"serial_aggregator -i $(IOTLAB_EXP_ID) $(NODES_PARAM_BASE)"'"'" \ RIOT_LOG-$(IOTLAB_EXP_NAME)-$(IOTLAB_EXP_ID), \ - serial_aggregator -i $(IOTLAB_EXP_ID) $(NODES_PARAM_BASE))'" + serial_aggregator -i $(IOTLAB_EXP_ID) $(NODES_PARAM_BASE))$(if $(IOTLAB_TMUX),',)" diff --git a/dist/testbed-support/README.iotlab.md b/dist/testbed-support/README.iotlab.md index 2d58e98ca1..0f2532927f 100644 --- a/dist/testbed-support/README.iotlab.md +++ b/dist/testbed-support/README.iotlab.md @@ -36,6 +36,7 @@ brackets): * IOTLAB_PROFILE * IOTLAB_EXCLUDE_NODES * IOTLAB_LOGGING + * IOTLAB_TMUX ### Format of a Resource ID Both variables `IOTLAB_PHY_NODES` and `IOTLAB_EXCLUDE_NODES` use the resource id @@ -86,5 +87,6 @@ using the resource id string format as described above. Uses ssh to login the user on the IoT-LAB server of the specified site and start the `serial_aggregator` to communication with all registered nodes. If `IOTLAB_LOGGING` is set to `1`, then closing the connection with `CTRL+C/D` will also quit -the logging process. Detach from the server-side tmux process with `CTRL+A-D` -(or as defined in your server-side `.tmux.conf` file) +the logging process. If you enabled TMUX with `IOTLAB_TMUX`, detach from the +server-side tmux process with `CTRL+A-D` (or as defined in your server-side +`.tmux.conf` file)