summaryrefslogtreecommitdiffstats
path: root/installer/opengnsys_update.sh
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
commit9e052210114bee919467714e282d11eec1f8ac82 (patch)
treea9b2ff4cd4e47f418f09f992efd4570e17a5ead5 /installer/opengnsys_update.sh
parent4fcf7d1b91102c5f7ebd0f2d62405dc1ccab1909 (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
Diffstat (limited to 'installer/opengnsys_update.sh')
-rwxr-xr-xinstaller/opengnsys_update.sh20
1 files changed, 11 insertions, 9 deletions
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"
}