summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorramon <ramongomez@us.es>2011-06-16 12:20:35 +0000
committerramon <ramongomez@us.es>2011-06-16 12:20:35 +0000
commit5eb61a6f20c13c0e025caa5f2075ed2c97e8d2cd (patch)
treeff15e8a4b7b151a2534280a7eb8330a7d8d25b56
parent375ee701eb26faa0efd748bcc2624fa6e828ff5a (diff)
Corregir permisos en instalación de TFTP; generar datos para menú por defecto del cliente (modifica #413)
git-svn-id: https://opengnsys.es/svn/branches/version1.0@2069 a21b9725-9963-47de-94b9-378ad31fedc9
-rwxr-xr-xclient/shared/etc/init/default.sh3
-rwxr-xr-xinstaller/opengnsys_installer.sh16
-rwxr-xr-xinstaller/opengnsys_update.sh20
3 files changed, 21 insertions, 18 deletions
diff --git a/client/shared/etc/init/default.sh b/client/shared/etc/init/default.sh
index 51f31dc0..928b4e9e 100755
--- a/client/shared/etc/init/default.sh
+++ b/client/shared/etc/init/default.sh
@@ -18,7 +18,8 @@ LOGLEVEL=5
#facilitando el entorno Og desde ssh
cp $OPENGNSYS/etc/preinit/loadenviron.sh /etc/profile.d/
-
+# Crear menú por defecto para el cliente
+generateMenuDefault
# Arranque de OpenGnSys Client.
if [ -x "$OPENGNSYS/bin/ogAdmClient" ]; then
diff --git a/installer/opengnsys_installer.sh b/installer/opengnsys_installer.sh
index fba8b4e8..55e4d000 100755
--- a/installer/opengnsys_installer.sh
+++ b/installer/opengnsys_installer.sh
@@ -648,8 +648,6 @@ EOF
# comprobamos el servicio tftp
sleep 1
testPxe
- ## damos perfimos de lectura a usuario web.
- chown -R $APACHE_RUN_USER:$APACHE_RUN_GROUP ${basetftp}
}
function testPxe ()
@@ -854,8 +852,8 @@ function createDirs()
# Establecer los permisos básicos.
echoAndLog "${FUNCNAME}(): setting directory permissions"
- chmod -R 775 $path_opengnsys_base/{log/clients,images,tftpboot/pxelinux.cfg,tftpboot/menu.lst}
- chown -R :$OPENGNSYS_CLIENT_USER $path_opengnsys_base/{log/clients,images,tftpboot/pxelinux.cfg,tftpboot/menu.lst}
+ chmod -R 775 $path_opengnsys_base/{log/clients,images}
+ chown -R :$OPENGNSYS_CLIENT_USER $path_opengnsys_base/{log/clients,images}
if [ $? -ne 0 ]; then
errorAndLog "${FUNCNAME}(): error while setting permissions"
return 1
@@ -912,10 +910,10 @@ function openGnsysCopyServerFiles ()
}
####################################################################
-### Funciones de compilación de códifo fuente de servicios
+### Funciones de compilación de código fuente de servicios
####################################################################
-# Compilar los servicios de OpenGNsys
+# Compilar los servicios de OpenGnSys
function servicesCompilation ()
{
local hayErrores=0
@@ -1034,13 +1032,15 @@ function clientCreate()
echoAndLog "${FUNCNAME}(): Copying Client files"
mkdir -p $TMPDIR
mount -o loop,ro $TARGETFILE $TMPDIR
- cp -vr $TMPDIR/* $INSTALL_TARGET/tftpboot
+ cp -vr $TMPDIR/ogclient $INSTALL_TARGET/tftpboot
umount $TMPDIR
rmdir $TMPDIR
# Establecer los permisos.
- chmod -R 755 $INSTALL_TARGET/tftpboot/ogclient
+ find -L $INSTALL_TARGET/tftpboot -type d -exec chmod 755 {} \
+ find -L $INSTALL_TARGET/tftpboot -type f -exec chmod 644 {} \
chown -R :$OPENGNSYS_CLIENT_USER $INSTALL_TARGET/tftpboot/ogclient
+ chown -R $APACHE_RUN_USER:$APACHE_RUN_GROUP $INSTALL_TARGET/tftpboot/{menu.lst,pxelinux.cfg}
echoAndLog "${FUNCNAME}(): Client generation success"
}
diff --git a/installer/opengnsys_update.sh b/installer/opengnsys_update.sh
index 9610d21e..cf159cc8 100755
--- a/installer/opengnsys_update.sh
+++ b/installer/opengnsys_update.sh
@@ -88,22 +88,22 @@ function checkAutoUpdate()
function getDateTime()
{
- date "+%Y%m%d-%H%M%S"
+ date "+%Y%m%d-%H%M%S"
}
# Escribe a fichero y muestra por pantalla
function echoAndLog()
{
- echo $1
- FECHAHORA=`getDateTime`
- echo "$FECHAHORA;$SSH_CLIENT;$1" >> $LOG_FILE
+ echo $1
+ DATETIME==`getDateTime`
+ echo "$DATETIME=;$SSH_CLIENT;$1" >> $LOG_FILE
}
function errorAndLog()
{
- echo "ERROR: $1"
- FECHAHORA=`getDateTime`
- echo "$FECHAHORA;$SSH_CLIENT;ERROR: $1" >> $LOG_FILE
+ echo "ERROR: $1"
+ DATETIME=`getDateTime`
+ echo "$DATETIME=;$SSH_CLIENT;ERROR: $1" >> $LOG_FILE
}
@@ -531,13 +531,15 @@ function updateClient()
echoAndLog "${FUNCNAME}(): Updatting ogclient files"
mkdir -p $TMPDIR
mount -o loop,ro $TARGETFILE $TMPDIR
- rsync -irplt $TMPDIR/* $INSTALL_TARGET/tftpboot
+ rsync -irlt $TMPDIR/ogclient $INSTALL_TARGET/tftpboot
umount $TMPDIR
rmdir $TMPDIR
# Establecer los permisos.
- chmod -R 755 $INSTALL_TARGET/tftpboot/ogclient
+ find -L $INSTALL_TARGET/tftpboot -type d -exec chmod 755 {} \
+ find -L $INSTALL_TARGET/tftpboot -type f -exec chmod 644 {} \
chown -R :$OPENGNSYS_CLIENTUSER $INSTALL_TARGET/tftpboot/ogclient
+ chown -R $APACHE_RUN_USER:$APACHE_RUN_GROUP $INSTALL_TARGET/tftpboot/{menu.lst,pxelinux.cfg}
echoAndLog "${FUNCNAME}(): Client update successfully"
}