forked from M-Labs/artiq
1
0
Fork 0

DEVELOPER_NOTES: add board lock script

This commit is contained in:
Sebastien Bourdeauducq 2017-10-31 22:53:39 +08:00
parent cd51bd3980
commit 35fd15db4a
1 changed files with 5 additions and 0 deletions

View File

@ -15,6 +15,11 @@ To lock the KC705 for the duration of the execution of a shell:
:: ::
flock /run/boards/kc705 bash 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. 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: To determine which user is locking a board, use: