summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--client/boot-tools/includes/etc/initramfs-tools/scripts/ogfunctions13
-rwxr-xr-xclient/shared/scripts/updateBootCache24
-rw-r--r--server/tftpboot/menu.lst/templates/pxe6
3 files changed, 24 insertions, 19 deletions
diff --git a/client/boot-tools/includes/etc/initramfs-tools/scripts/ogfunctions b/client/boot-tools/includes/etc/initramfs-tools/scripts/ogfunctions
index 27efc6d3..0204b5c6 100644
--- a/client/boot-tools/includes/etc/initramfs-tools/scripts/ogfunctions
+++ b/client/boot-tools/includes/etc/initramfs-tools/scripts/ogfunctions
@@ -365,9 +365,12 @@ ogGetROOTSERVER ()
#@version 0.9
#@author Antonio J. Doblas. Universidad de Malaga.
#@date 2011/05/24
-#@author Irina Gómez. ETSII Universidad de Sevilla
#@version 1.1.0 - Permite varios ogLive dentro de subdirectorios
+#@author Irina Gómez. ETSII Universidad de Sevilla
#@date 2017/04/27
+#@version 1.1.0 - Se permite varios ogLives en la CACHE
+#@author Antonio J. Doblas Viso. Universidad de Malaga
+#@date 2017/05/31
#*/ ##
ogUpdateInitrd ()
@@ -380,7 +383,7 @@ ogUpdateInitrd ()
# Salir si no se detecta caché.
[ -z "$TYPE" ] && return
mount -t $TYPE LABEL=CACHE /tmp/cache || return
- mkdir -p /tmp/cache/boot
+ mkdir -p /tmp/cache/boot/$OGLIVEDIR
# comparamos los del server
@@ -391,13 +394,13 @@ ogUpdateInitrd ()
#comparamos los de la cache
- CACHEVMLINUZ=`cat /tmp/cache/boot/ogvmlinuz.sum`
- CACHEINITRD=`cat /tmp/cache/boot/oginitrd.img.sum`
+ CACHEVMLINUZ=`cat /tmp/cache/boot/$OGLIVEDIR/ogvmlinuz.sum`
+ CACHEINITRD=`cat /tmp/cache/boot/$OGLIVEDIR/oginitrd.img.sum`
echo "MD5 on SERVER: $SERVERVMLINUZ $SERVERINITRD"
echo "MD5 on CACHE: $CACHEVMLINUZ $CACHEINITRD"
- cd /tmp/cache/boot
+ cd /tmp/cache/boot/$OGLIVEDIR || mkdir -p /tmp/cache/boot/$OGLIVEDIR
if [ "$CACHEVMLINUZ" != "$SERVERVMLINUZ" ]
then
diff --git a/client/shared/scripts/updateBootCache b/client/shared/scripts/updateBootCache
index 2ea7e2b4..4359bc43 100755
--- a/client/shared/scripts/updateBootCache
+++ b/client/shared/scripts/updateBootCache
@@ -12,24 +12,28 @@
#@version 1.0.1 - requiere el gestor de arranque grub2dos
#@author Antonio J. Doblas Viso. Universidad de Malaga.
#@date 2010/07/27
-#@author Irina Gómez. ETSII Universidad de Sevilla
#@version 1.1.0 - Permite varios ogLive dentro de subdirectorios
+#@author Irina Gómez. ETSII Universidad de Sevilla
#@date 2017/04/27
+#@version 1.1.0 - Se permite varios ogLives en la CACHE
+#@author Antonio J. Doblas Viso. Universidad de Malaga
+#@date 2017/05/31
#*/ ##
OGLIVEDIR=${oglivedir:-"ogclient"}
OGBTFTP="/opt/oglive/tftpboot/$OGLIVEDIR"
+OGBCACHE="$OGCAC/boot/$OGLIVEDIR"
ogMountCache || exit 1
-[ -d $OGCAC/boot ] || mkdir -p $OGCAC/boot
+[ -d $OGBCACHE ] || mkdir -p $OGBCACHE
# comparamos los del server
SERVERVMLINUZ=`cat ${OGBTFTP}/ogvmlinuz.sum`
SERVERINITRD=`cat ${OGBTFTP}/oginitrd.img.sum`
#comparamos los de la cache
- CACHEVMLINUZ=`cat ${OGCAC}/boot/ogvmlinuz.sum`
- CACHEINITRD=`cat ${OGCAC}/boot/oginitrd.img.sum`
+ CACHEVMLINUZ=`cat ${OGBCACHE}/ogvmlinuz.sum`
+ CACHEINITRD=`cat ${OGBCACHE}/oginitrd.img.sum`
echo "MD5 on SERVER: $SERVERVMLINUZ $SERVERINITRD"
echo "MD5 on CACHE: $CACHEVMLINUZ $CACHEINITRD"
@@ -38,15 +42,15 @@ ogMountCache || exit 1
if [ "$CACHEVMLINUZ" != "$SERVERVMLINUZ" ]
then
echo "ogvmlinuz updating"
- cp ${OGBTFTP}/ogvmlinuz ${OGCAC}/boot/ogvmlinuz
- cp ${OGBTFTP}/ogvmlinuz.sum ${OGCAC}/boot/ogvmlinuz.sum
+ cp "${OGBTFTP}/ogvmlinuz" "${OGBCACHE}/ogvmlinuz"
+ cp "${OGBTFTP}/ogvmlinuz.sum" "${OGBCACHE}/ogvmlinuz.sum"
DOREBOOT=true
fi
if [ "$CACHEINITRD" != "$SERVERINITRD" ]
then
echo "oginitrd updating"
- cp ${OGBTFTP}/oginitrd.img ${OGCAC}/boot/oginitrd.img
- cp ${OGBTFTP}/oginitrd.img.sum ${OGCAC}/boot/oginitrd.img.sum
+ cp "${OGBTFTP}/oginitrd.img" "${OGBCACHE}/oginitrd.img"
+ cp "${OGBTFTP}/oginitrd.img.sum" "${OGBCACHE}/oginitrd.img.sum"
DOREBOOT=true
fi
@@ -54,9 +58,7 @@ echo $DOREBOOT
# [ "$DOREBOOT" == "true" ] && busybox reboot -f
#TODO: Comprobar si es necesario
-#cp -prv cp ${OGBTFTP}/ ${OGCAC}/boot/
+#cp -prv cp ${OGBTFTP}/ ${OGBCACHE}
#TODO
#/opt/opengnsys/lib/grub4dos/bootlace.com /dev/sda
-
-
diff --git a/server/tftpboot/menu.lst/templates/pxe b/server/tftpboot/menu.lst/templates/pxe
index a1e766bb..ce474e10 100644
--- a/server/tftpboot/menu.lst/templates/pxe
+++ b/server/tftpboot/menu.lst/templates/pxe
@@ -21,9 +21,9 @@ savedefault fallback
boot
title OpenGnsys-CACHE
-find --set-root --ignore-floppies --ignore-cd /boot/ogvmlinuz
-kernel /boot/ogvmlinuz ro boot=oginit quiet splash vga=788 irqpoll acpi=on og2nd=sqfs ogprotocol=smb ogactiveadmin=false ogdebug=false ogupdateinitrd=true INFOHOST
-initrd /boot/oginitrd.img
+find --set-root --ignore-floppies --ignore-cd /boot/ogclient/ogvmlinuz
+kernel /boot/ogclient/ogvmlinuz ro boot=oginit quiet splash vga=788 irqpoll acpi=on og2nd=sqfs ogprotocol=smb ogactiveadmin=false ogdebug=false ogupdateinitrd=true INFOHOST
+initrd /boot/ogclient/oginitrd.img
savedefault fallback
boot