From 5969a131491786738a52790a0fa82105c7d41c55 Mon Sep 17 00:00:00 2001 From: Irina Gómez Date: Thu, 23 Jan 2020 12:49:30 +0100 Subject: #802 #888 opengnsys_update.sh adds arquitecture detection in dhcp configuration and prepares netboot directory, both for UEFI computers. --- installer/opengnsys_update.sh | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/installer/opengnsys_update.sh b/installer/opengnsys_update.sh index 99a51b96..bb0353d5 100755 --- a/installer/opengnsys_update.sh +++ b/installer/opengnsys_update.sh @@ -830,7 +830,7 @@ function createDirs() for f in grub-mknetdir grub2-mknetdir; do if which $f &>/dev/null; then MKNETDIR=$f; fi done - $MKNETDIR --net-directory=$TFTPCFGDIR --subdir=grub + $MKNETDIR --net-directory=${INSTALL_TARGET}/tftpboot --subdir=grub # Crear usuario ficticio. if id -u $OPENGNSYS_CLIENTUSER &>/dev/null; then @@ -913,6 +913,8 @@ function updateServerFiles() admin/Sources/Services/ogAdmServerAux \ admin/Sources/Services/ogAdmRepoAux \ server/tftpboot \ + /usr/lib/shim/shimx64.efi.signed \ + /usr/lib/grub/x86_64-efi-signed/grubnetx64.efi.signed \ installer/opengnsys_uninstall.sh \ installer/opengnsys_export.sh \ installer/opengnsys_import.sh \ @@ -923,6 +925,8 @@ function updateServerFiles() sbin/ogAdmServerAux \ sbin/ogAdmRepoAux \ tftpboot \ + tftpboot/shimx64.efi.signed \ + tftpboot/grubx64.efi \ lib/opengnsys_uninstall.sh \ lib/opengnsys_export.sh \ lib/opengnsys_import.sh \ @@ -951,6 +955,18 @@ function updateServerFiles() service=$DHCPSERV; $STARTSERVICE NEWFILES="/etc/dhcp*/dhcpd*.conf" fi + if ! grep -q 'shimx64.efi.signed' /etc/dhcp*/dhcpd*.conf; then + echoAndLog "${FUNCNAME}(): updating DHCP files for UEFI computers" + UEFICFG=" # 0007 == x64 EFI boot\n"\ +" if option arch = 00:07 {\n"\ +" filename \"shimx64.efi.signed\";\n"\ +" } else {\n"\ +" filename \"grldr\";\n"\ +" }" + sed -i -e 2i"option arch code 93 = unsigned integer 16;" -e s@"^.*grldr\"\;"@"$UEFICFG"@g /etc/dhcp*/dhcpd*.conf + service=$DHCPSERV; $STARTSERVICE + NEWFILES="/etc/dhcp*/dhcpd*.conf" + fi if ! diff -q $WORKDIR/opengnsys/admin/Sources/Services/opengnsys.init /etc/init.d/opengnsys 2>/dev/null; then echoAndLog "${FUNCNAME}(): updating new init file" backupFile /etc/init.d/opengnsys -- cgit v1.2.3-18-g5258