diff options
author | khilman <khilman@users.noreply.github.com> | 2018-10-18 10:41:32 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-10-18 10:41:32 +0200 |
commit | 444653525a07faeee32eab0c07ec972ed6fe8967 (patch) | |
tree | acb42f5c455385dcac78d82e7ece15da57622405 /lava-master/scripts | |
parent | 24fb00544ba3191216876112d3bad8a742812ed6 (diff) | |
parent | 135f1dca856775d0d365c0c1045a7add8626da01 (diff) |
Merge pull request #53 from montjoie/board_for_user
Permit to give board to user
Diffstat (limited to 'lava-master/scripts')
-rwxr-xr-x | lava-master/scripts/setup.sh | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/lava-master/scripts/setup.sh b/lava-master/scripts/setup.sh index 426876f..b362d16 100755 --- a/lava-master/scripts/setup.sh +++ b/lava-master/scripts/setup.sh @@ -66,6 +66,30 @@ if [ -e /root/lava-users ];then done fi +if [ -e /root/lava-groups ];then + for group in $(ls /root/lava-groups/*group) + do + GROUPNAME="" + SUBMIT=0 + OPTION_SUBMIT="" + . $group + if [ $SUBMIT -eq 1 ];then + echo "DEBUG: $GROUPNAME can submit jobs" + OPTION_SUBMIT="--submitting" + fi + echo "DEBUG: Add group $GROUPNAME" + lava-server manage groups add $OPTION_SUBMIT $GROUPNAME || exit 1 + if [ -e ${group}.list ];then + echo "DEBUG: Found ${group}.list" + while read username + do + echo "DEBUG: Add user $username to group $GROUPNAME" + lava-server manage groups update --username $username $GROUPNAME || exit 1 + done < ${group}.list + fi + done +fi + if [ -e /root/lava-callback-tokens ];then for ct in $(ls /root/lava-callback-tokens) do |