index : builder | |
Archlinux32 build system | gitolite user |
summaryrefslogtreecommitdiff |
-rwxr-xr-x | bin/manage-slaves | 16 |
diff --git a/bin/manage-slaves b/bin/manage-slaves index cddda84..3dbd83a 100755 --- a/bin/manage-slaves +++ b/bin/manage-slaves @@ -9,6 +9,7 @@ usage() { >&2 echo 'manage-slaves $action [parameters]: manage the list of build slaves' >&2 echo '' >&2 echo 'possible actions:' + >&2 echo ' list' >&2 echo ' add $name $owner $ssh-key-fingerprint' >&2 echo ' disable $name' >&2 echo ' enable $name' @@ -33,6 +34,21 @@ if errors=$( fi case "$1" in + 'list') + infos=$( + # shellcheck disable=SC2016 + { + printf 'SELECT' + printf ' name, CASE WHEN access_allowed = 1 THEN "enabled" ELSE "disabled" END ' + printf ' name, CASE WHEN is_sane = 1 THEN "sane" ELSE "not sane" END ' + printf ' FROM build_slaves' + printf ';\n' + } | \ + mysql_run_query | \ + tr '\t' ' ' + ) + echo "${infos[@]}" + ;; 'add') shift if [ $# -ne 3 ]; then |