diff options
Diffstat (limited to 'installer')
-rwxr-xr-x | installer/opengnsys_export.sh | 1 | ||||
-rwxr-xr-x | installer/opengnsys_import.sh | 8 | ||||
-rwxr-xr-x | installer/opengnsys_installer.sh | 9 |
3 files changed, 14 insertions, 4 deletions
diff --git a/installer/opengnsys_export.sh b/installer/opengnsys_export.sh index 747a795a..ced1c0ae 100755 --- a/installer/opengnsys_export.sh +++ b/installer/opengnsys_export.sh @@ -99,6 +99,7 @@ tar -cvzf $BACKUPFILE --transform="s!^!$BACKUPPREFIX/!" \ -C $TMPDIR IPSERVER.txt \ -C $DHCPDIR dhcpd.conf \ -C $OPENGNSYS/tftpboot menu.lst \ + -C $OPENGNSYS/tftpboot grub \ -C $OPENGNSYS/doc VERSION.json \ -C $OPENGNSYS/client/etc engine.cfg engine.json \ -C $OPENGNSYS/www menus \ diff --git a/installer/opengnsys_import.sh b/installer/opengnsys_import.sh index c3b343ee..1f5ce410 100755 --- a/installer/opengnsys_import.sh +++ b/installer/opengnsys_import.sh @@ -305,9 +305,11 @@ done # TFTP echo " * Guardamos los ficheros PXE de los clientes." -mv $OPENGNSYS/tftpboot/menu.lst $OPENGNSYS/tftpboot/menu.lst-$DATE -cp -r $TMPDIR/menu.lst $OPENGNSYS/tftpboot -chown -R www-data:www-data $OPENGNSYS/tftpboot/menu.lst +for BOOTLOADER in menu.lst grub; do + mv $OPENGNSYS/tftpboot/$BOOTLOADER $OPENGNSYS/tftpboot/$BOOTLOADER-$DATE + cp -r $TMPDIR/$BOOTLOADER $OPENGNSYS/tftpboot + chown -R www-data:www-data $OPENGNSYS/tftpboot/$BOOTLOADER +done # Configuración de los clientes echo " * Guardamos la configuración de los clientes." diff --git a/installer/opengnsys_installer.sh b/installer/opengnsys_installer.sh index e515711f..2894b801 100755 --- a/installer/opengnsys_installer.sh +++ b/installer/opengnsys_installer.sh @@ -266,11 +266,17 @@ TMPMYCNF=/tmp/.my.cnf.$$ # Modificar variables de configuración tras instalar paquetes del sistema. function autoConfigurePost() { -local f +local f MKNETDIR # Configuraciones específicas para Samba y TFTP en Debian 6. [ -z "$SYSTEMD" -a ! -e /etc/init.d/$SAMBASERV ] && SAMBASERV=samba [ ! -e $TFTPCFGDIR ] && TFTPCFGDIR=/srv/tftp + +# Preparar arranque en red con Grub. +for f in grub-mknetdir grub2-mknetdir; do + if which $f &>/dev/null; then MKNETDIR=$f; fi +done +$MKNETDIR --net-directory=$TFTPCFGDIR --subdir=grub } @@ -1430,6 +1436,7 @@ function clientCreate() oglivecli install $FILENAME # Adaptar permisos. chown -R $APACHE_RUN_USER:$APACHE_RUN_GROUP $INSTALL_TARGET/tftpboot/menu.lst + chown -R $APACHE_RUN_USER:$APACHE_RUN_GROUP $INSTALL_TARGET/tftpboot/grub echoAndLog "${FUNCNAME}(): Client generation success" } |