summaryrefslogtreecommitdiffstats
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
parent6a2bd870329061679618e23ddb13164018c1de06 (diff)
#888 #914: Updating UEFI requisites.
-rwxr-xr-xinstaller/opengnsys_update.sh12
-rwxr-xr-xserver/bin/checkperms2
2 files changed, 9 insertions, 5 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
diff --git a/server/bin/checkperms b/server/bin/checkperms
index 5c558c45..a148b60f 100755
--- a/server/bin/checkperms
+++ b/server/bin/checkperms
@@ -53,7 +53,7 @@ chmod 640 $OPENGNSYS_DIR/{www/controlacceso*.php,etc/ogAdmRepo*.cfg}
chown -R $APACHE_USER:$APACHE_GROUP $OPENGNSYS_DIR/www/images/{fotos,iconos}
mkdir -p $OPENGNSYS_DIR/www/{api,tmp}
chown -R $APACHE_USER:$APACHE_GROUP $OPENGNSYS_DIR/www/{api,tmp}
-chown -R $APACHE_USER:$APACHE_GROUP $OPENGNSYS_DIR/tftpboot/menu.lst
+chown -R $APACHE_USER:$APACHE_GROUP $OPENGNSYS_DIR/tftpboot/{menu.lst,grub}
chown -R :$OPENGNSYS_USER $OPENGNSYS_DIR/tftpboot/ogLive*
find -L $OPENGNSYS_DIR/tftpboot -type d -exec chmod 755 {} \;
find -L $OPENGNSYS_DIR/tftpboot -type f -exec chmod 644 {} \;