diff options
author | ramon <ramongomez@us.es> | 2017-06-09 09:36:56 +0000 |
---|---|---|
committer | ramon <ramongomez@us.es> | 2017-06-09 09:36:56 +0000 |
commit | 7c841bdade483f0aabecd2ee1d6f9364fdee989b (patch) | |
tree | efbccee55b456b611428671f57bd1027d441f5ed /server/bin/setclientlive | |
parent | ec62ac9b5b165a5b1a68172b58acbaaa6c863988 (diff) |
#768: Adaptar nuevos cambios a scripts {{{listclientlive}}} y {{{setclientlive}}}.
git-svn-id: https://opengnsys.es/svn/branches/version1.1@5358 a21b9725-9963-47de-94b9-378ad31fedc9
Diffstat (limited to 'server/bin/setclientlive')
-rwxr-xr-x | server/bin/setclientlive | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/server/bin/setclientlive b/server/bin/setclientlive index ea3a7db0..3ce417cb 100755 --- a/server/bin/setclientlive +++ b/server/bin/setclientlive @@ -60,11 +60,14 @@ password=$PASSWORD EOT # Borrar el fichero temporal si termina el proceso. trap "rm -f $MYCNF" 0 1 2 3 6 9 15 +# Actualizar ogLive asignado al aula. +mysql --defaults-extra-file="$MYCNF" -D "$CATALOG" -e \ + "UPDATE aulas SET oglivedir='$OGLIVEDIR' WHERE nombreaula='$RESOURCE';" # Actualizar ogLive para todos los clientes y reasignar plantilla PXE. listclientmode "$RESOURCE" | awk -F\" '{print $2,$4}' | \ - while read PC BOOTMODE; do + while read -r PC BOOTMODE; do date +"%b %d %T $PROG: Configurando \"$PC\" con cliente \"$OGLIVEDIR\"" | tee -a $LOGFILE - mysql --defaults-extra-file=$MYCNF -D "$CATALOG" -e \ + mysql --defaults-extra-file="$MYCNF" -D "$CATALOG" -e \ "UPDATE ordenadores SET oglivedir='$OGLIVEDIR' WHERE nombreordenador='$PC';" - setclientmode $BOOTMODE $PC PERM >/dev/null + setclientmode "$BOOTMODE" "$PC" PERM >/dev/null done |