diff options
author | ramon <ramongomez@us.es> | 2011-06-16 12:20:35 +0000 |
---|---|---|
committer | ramon <ramongomez@us.es> | 2011-06-16 12:20:35 +0000 |
commit | 9e052210114bee919467714e282d11eec1f8ac82 (patch) | |
tree | a9b2ff4cd4e47f418f09f992efd4570e17a5ead5 | |
parent | 4fcf7d1b91102c5f7ebd0f2d62405dc1ccab1909 (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/trunk@2069 a21b9725-9963-47de-94b9-378ad31fedc9
-rwxr-xr-x | client/shared/etc/init/default.sh | 3 | ||||
-rwxr-xr-x | installer/opengnsys_installer.sh | 16 | ||||
-rwxr-xr-x | installer/opengnsys_update.sh | 20 |
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 797f8ab9..e9ec8ccf 100755 --- a/installer/opengnsys_installer.sh +++ b/installer/opengnsys_installer.sh @@ -577,8 +577,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 () @@ -882,8 +880,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,tftpboot} + chown -R :$OPENGNSYS_CLIENT_USER $path_opengnsys_base/{log/clients,images} if [ $? -ne 0 ]; then errorAndLog "${FUNCNAME}(): error while setting permissions" return 1 @@ -940,10 +938,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 @@ -1111,13 +1109,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 76904e86..7178db52 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}(): Updating 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" } |