From fdee33561c0e98b4ea1313bb0b310b13f5ed4e07 Mon Sep 17 00:00:00 2001 From: Stephan Maka Date: Thu, 30 May 2019 13:29:30 +0200 Subject: [PATCH] extended-tests: move lockctl fifo inside a tmp dir --- main.nix | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/main.nix b/main.nix index 6bde381..3d67107 100644 --- a/main.nix +++ b/main.nix @@ -92,13 +92,14 @@ in cp /opt/hydra_id_rsa $HOME/.ssh/id_rsa cp /opt/hydra_id_rsa.pub $HOME/.ssh/id_rsa.pub echo "rpi-1,192.168.1.188 ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIMc7waNkP2HjL5Eo94evoxJhC8CbYj4i2n1THe5TPIR3" > $HOME/.ssh/known_hosts - chmod 600 $HOME/.ssh/id_rsa - mkfifo /tmp/lockctl + chmod 600 $HOME/.ssh/id_rs + LOCKCTL=$(mktemp -d) + mkfifo $LOCKCTL/lockctl - cat /tmp/lockctl | ssh rpi-1 'flock /tmp/board_lock-kc705-1 -c "echo Ok; cat"' | ( + cat $LOCKCTL/lockctl | ssh rpi-1 'flock /tmp/board_lock-kc705-1 -c "echo Ok; cat"' | ( # End remote flock via FIFO atexit_unlock() { - echo > /tmp/lockctl + echo > $LOCKCTL/lockctl } trap atexit_unlock EXIT