From 35fd15db4a231ccdc8791f5c1339c6422bb52e5d Mon Sep 17 00:00:00 2001 From: Sebastien Bourdeauducq Date: Tue, 31 Oct 2017 22:53:39 +0800 Subject: [PATCH] DEVELOPER_NOTES: add board lock script --- DEVELOPER_NOTES.rst | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/DEVELOPER_NOTES.rst b/DEVELOPER_NOTES.rst index 9b05876cc..64be3469d 100644 --- a/DEVELOPER_NOTES.rst +++ b/DEVELOPER_NOTES.rst @@ -15,6 +15,11 @@ To lock the KC705 for the duration of the execution of a shell: :: flock /run/boards/kc705 bash +You may also use this script: +:: + #!/bin/bash + exec flock /run/boards/$1 bash --rcfile <(cat ~/.bashrc; echo PS1=\"[$1\ lock]\ \$PS1\") + If the board is already locked by another user, the ``flock`` commands above will wait for the lock to be released. To determine which user is locking a board, use: