diff options
author | Javier Sánchez Parra <jsanchez@soleta.eu> | 2020-08-21 13:20:44 +0200 |
---|---|---|
committer | OpenGnSys Support Team <soporte-og@soleta.eu> | 2020-08-21 18:35:10 +0200 |
commit | b1ef1351553bdc43077d001a759b62b720d11ae2 (patch) | |
tree | 3e331e67007f03a1a4b0e4326550e5679e9ddabd /client/engine | |
parent | 3aadac3b9b8412ac91095ef8586605fe3da0d8b7 (diff) |
#999 Fix ogClient session command
Irina reports that booting an OS from ogLive is not working. This is happening
because the bootOS shell script kills ogClient before invoking kexec to start
the OS. However, ogClient runs this shell script that initiates the boot
process, so it is also stopping the boot process.
The ogClient needs to close the connection with ogServer before kexec,
otherwise ogServer keeps reporting via REST API that the client is in ogLive
state / busy state. Because after kexec everything is gone basically.
This patch updates the script to:
1) spawn a process to kill the ogClient in 2 seconds, so the ogClient has time
to reply to the ogServer and to close the connection gracefully.
2) spawn a process to invoke kexec in 3 seconds to boot the OS.
[1] 2ead1639fd54bcf92d56cf7bf89b8d9cf4d6d24e
Diffstat (limited to 'client/engine')
-rwxr-xr-x | client/engine/Boot.lib | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/client/engine/Boot.lib b/client/engine/Boot.lib index 376472ec..383777d8 100755 --- a/client/engine/Boot.lib +++ b/client/engine/Boot.lib @@ -121,8 +121,8 @@ case "$TYPE" in else # Arranque BIOS: configurar kernel Linux con los parámetros leídos de su GRUB. kexec -l "${MNTDIR}${KERNEL}" --append="$APPEND" --initrd="${MNTDIR}${INITRD}" - pkill ogclient - kexec -e & + nohup bash -c 'sleep 2 && pkill ogclient' >/dev/null 2>&1 & + nohup bash -c 'sleep 3 && kexec -e' >/dev/null 2>&1 & fi ;; Windows) @@ -154,8 +154,8 @@ case "$TYPE" in # Modo de arranque en caliente (con kexec). cp $OGLIB/grub4dos/* $MNTDIR # */ (Comentario Doxygen) kexec -l $MNTDIR/grub.exe --append=--config-file="root (hd$[$1-1],$[$2-1]); chainloader (hd$[$1-1],$[$2-1])/$LOADER; tpm --init" - pkill ogclient - kexec -e & + nohup bash -c 'sleep 2 && pkill ogclient' >/dev/null 2>&1 & + nohup bash -c 'sleep 3 && kexec -e' >/dev/null 2>&1 & else # Modo de arranque por reinicio (con reboot). dd if=/dev/zero of=${MNTDIR}/ogboot.me bs=1024 count=3 |