summaryrefslogtreecommitdiffstats
path: root/installer
diff options
context:
space:
mode:
authorRamón M. Gómez <ramongomez@us.es>2019-06-07 11:17:44 +0200
committerRamón M. Gómez <ramongomez@us.es>2019-06-07 11:17:44 +0200
commit8cb279bc1cc8512570abcc16e26862f258b74c2c (patch)
tree0c03e9cda8d655b7780f69fe0a8b0c087b6ef7dd /installer
parent6a2bd870329061679618e23ddb13164018c1de06 (diff)
#888 #914: Updating UEFI requisites.
Diffstat (limited to 'installer')
-rwxr-xr-xinstaller/opengnsys_update.sh12
1 files changed, 8 insertions, 4 deletions
diff --git a/installer/opengnsys_update.sh b/installer/opengnsys_update.sh
index 83352ab9..5c426e2d 100755
--- a/installer/opengnsys_update.sh
+++ b/installer/opengnsys_update.sh
@@ -747,7 +747,7 @@ function createDirs()
{
# Crear estructura de directorios.
echoAndLog "${FUNCNAME}(): creating directory paths in ${INSTALL_TARGET}"
- local dir
+ local dir MKNETDIR
mkdir -p ${INSTALL_TARGET}/{bin,doc,etc,lib,sbin,www}
mkdir -p ${INSTALL_TARGET}/{client,images/groups}
@@ -766,6 +766,12 @@ function createDirs()
fi
! [ -f $INSTALL_TARGET/tftpboot/menu.lst/templates/00unknown ] && mv $INSTALL_TARGET/tftpboot/menu.lst/templates/* $INSTALL_TARGET/tftpboot/menu.lst/examples
+ # 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
+
# Crear usuario ficticio.
if id -u $OPENGNSYS_CLIENTUSER &>/dev/null; then
echoAndLog "${FUNCNAME}(): user \"$OPENGNSYS_CLIENTUSER\" is already created"
@@ -961,9 +967,7 @@ function compileServices()
popd
# Parar antiguo servicio de repositorio y añadir clave de acceso REST en su fichero de configuración.
pgrep ogAdmRepo > /dev/null && service="ogAdmRepo" $STOPSERVICE
- grep -q '^ApiToken=' $INSTALL_TARGET/etc/ogAdmRepo.cfg && \
- sed -i "s/^ApiToken=.*$/ApiToken=$REPOKEY/" $INSTALL_TARGET/etc/ogAdmRepo.cfg || \
- sed -i "$ a\ApiToken=$REPOKEY/" $INSTALL_TARGET/etc/ogAdmRepo.cfg
+ sed -i -n -e "/^ApiToken=/!p" -e "$ a\ApiToken=$REPOKEY/" $INSTALL_TARGET/etc/ogAdmRepo.cfg
# Compilar OpenGnsys Agent
echoAndLog "${FUNCNAME}(): Recompiling OpenGnsys Server Agent"
pushd $WORKDIR/opengnsys/admin/Sources/Services/ogAdmAgent