summaryrefslogtreecommitdiffstats
path: root/server/bin/setclientmode
diff options
context:
space:
mode:
authorRamón M. Gómez <ramongomez@us.es>2018-10-22 11:00:50 +0200
committerRamón M. Gómez <ramongomez@us.es>2018-10-22 11:00:50 +0200
commit6449e044d17663d43f5e9e085f1b8f10825ed79d (patch)
tree7e8f5177b0343f9b746df787ce737e8eb204cd9a /server/bin/setclientmode
parent413d6e1d36ddc380456c5970398c5b5b9d059a25 (diff)
#870: Allow creation of the PXE file if computer is not associated with a repository.
Diffstat (limited to 'server/bin/setclientmode')
-rwxr-xr-xserver/bin/setclientmode4
1 files changed, 2 insertions, 2 deletions
diff --git a/server/bin/setclientmode b/server/bin/setclientmode
index 1ca39691..7dadc684 100755
--- a/server/bin/setclientmode
+++ b/server/bin/setclientmode
@@ -100,7 +100,7 @@ for MAC in $ETHERNET; do
(SELECT (@serverip:=ipserveradm) FROM entornos LIMIT 1), aulas.router, aulas.netmask,
ordenadores.nombreordenador, ordenadores.netiface, 'none'),
' group=', REPLACE(TRIM(aulas.nombreaula), ' ', '_'),
- ' ogrepo=', (@repoip:=repositorios.ip),
+ ' ogrepo=', (@repoip:=IFNULL(repositorios.ip, '')),
' oglive=', @serverip,
' oglog=', @serverip,
' ogshare=', @serverip,
@@ -120,7 +120,7 @@ for MAC in $ETHERNET; do
JOIN aulas USING(idaula)
JOIN centros USING(idcentro)
JOIN entidades USING(identidad)
- JOIN repositorios USING(idrepositorio)
+ LEFT JOIN repositorios USING(idrepositorio)
LEFT JOIN perfileshard USING(idperfilhard)
LEFT JOIN menus USING(idmenu)
WHERE ordenadores.mac='$MAC';")