summaryrefslogtreecommitdiffstats
path: root/installer/opengnsys_update.sh
diff options
context:
space:
mode:
authorIrina Gómez <irinagomez@us.es>2020-01-23 12:49:30 +0100
committerIrina Gómez <irinagomez@us.es>2020-01-23 12:49:30 +0100
commit5969a131491786738a52790a0fa82105c7d41c55 (patch)
treed1285ae371b9ed5f4cd3c4df7b460945e1ce96d2 /installer/opengnsys_update.sh
parentecdb637fb6ac482ac1ccff013b265b32ec3c9a75 (diff)
#802 #888 opengnsys_update.sh adds arquitecture detection in dhcp configuration and prepares netboot directory, both for UEFI computers.
Diffstat (limited to 'installer/opengnsys_update.sh')
-rwxr-xr-xinstaller/opengnsys_update.sh18
1 files changed, 17 insertions, 1 deletions
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