diff options
author | ramon <ramongomez@us.es> | 2015-04-20 10:56:54 +0000 |
---|---|---|
committer | ramon <ramongomez@us.es> | 2015-04-20 10:56:54 +0000 |
commit | 1a2fa9d82bafd3ef8e0d703bf715fe3e58853d0d (patch) | |
tree | 1e008f200ff4b413d0807eee03df75ef42f39fab /client/shared/scripts/generateMenuDefault | |
parent | c916af9faafcd8fa120aeaf9092c0847aa09183a (diff) |
#673: Actualizar código incluido en OepnGnSys 1.0.6 sobre la rama {{{version1.1}}} para desarrollar la nueva versión.
git-svn-id: https://opengnsys.es/svn/branches/version1.1@4609 a21b9725-9963-47de-94b9-378ad31fedc9
Diffstat (limited to 'client/shared/scripts/generateMenuDefault')
-rwxr-xr-x | client/shared/scripts/generateMenuDefault | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/client/shared/scripts/generateMenuDefault b/client/shared/scripts/generateMenuDefault index 7a9abd6e..09e4300f 100755 --- a/client/shared/scripts/generateMenuDefault +++ b/client/shared/scripts/generateMenuDefault @@ -9,7 +9,7 @@ source /tmp/net-$DEVICE.conf FILEINFOHTML=$OGLOG/`ogGetIpAddress`.info.html FILEINFOCACHE=$OGLOG/`ogGetIpAddress`.cache.txt ogMountCache 2>/dev/null -CACHECONTENIDO=`ls -m $OGCAC/$OGIMG 2>/dev/null` +CACHECONTENIDO="ls -m $OGCAC/$OGIMG 2>/dev/null" SPEED=$(LANG=C ethtool $DEVICE 2>/dev/null | awk '$1~/Speed/ {print $2}') case "${SPEED,,}" in @@ -23,8 +23,13 @@ case "${DUPLEX,,}" in full) ;; *) DUPLEX="<font color=\"red\">$DUPLEX</font>" esac + CACHESIZEFREE=$(ogGetFreeSize `ogFindCache`) -expr $CACHESIZEFREE / 1024 > $FILEINFOCACHE 2>/dev/null && echo '.MB,' >> $FILEINFOCACHE +if [ $CACHESIZEFREE == 0 ]; then + echo '0.MB,' > $FILEINFOCACHE +else + expr $CACHESIZEFREE / 1024 > $FILEINFOCACHE 2>/dev/null && echo '.MB,' >> $FILEINFOCACHE +fi # Crear menú por defecto. cat > $FILEINFOHTML << EOT @@ -72,7 +77,5 @@ cat >> $FILEINFOHTML << EOT EOT # Crear contenido de la caché. -cat >> $FILEINFOCACHE << EOT -$CACHECONTENIDO -EOT +eval $CACHECONTENIDO >> $FILEINFOCACHE |