diff options
author | ramon <ramongomez@us.es> | 2014-05-28 17:42:12 +0000 |
---|---|---|
committer | ramon <ramongomez@us.es> | 2014-05-28 17:42:12 +0000 |
commit | b0a4c8c7a475c18dab3ce6d4860d6a885209c803 (patch) | |
tree | 61325ad4b7dd946f58421c00da215b979d22faaf /client/engine/Cache.lib | |
parent | 315676028e6a21b0f13681e46e9ebb56a1fa0ba8 (diff) |
#495: revertir código para volver a usar función {{{ogFindCache}}} correcta.
git-svn-id: https://opengnsys.es/svn/branches/version1.0@4290 a21b9725-9963-47de-94b9-378ad31fedc9
Diffstat (limited to 'client/engine/Cache.lib')
-rwxr-xr-x | client/engine/Cache.lib | 38 |
1 files changed, 11 insertions, 27 deletions
diff --git a/client/engine/Cache.lib b/client/engine/Cache.lib index 4073cc02..ff32e38e 100755 --- a/client/engine/Cache.lib +++ b/client/engine/Cache.lib @@ -221,33 +221,17 @@ if [ "$*" == "help" ]; then return fi -TYPEDISK=$(ogGetPartitionTableType 1) #agp -if [ "$TYPEDISK" == "GPT" ]; then - # Error si no hay definida partición de caché. - DEV=$(ogFindCache) || ogRaiseError $OG_ERR_PARTITION "$MSG_NOCACHE" || return $? - DEV=$(ogDiskToDev $DEV) || return $? - # buscamos el nombre de la particion CACHE - # si la encuentra formateamos la formateamos - if [ `sgdisk /dev/sda -p | grep -o CACHE` == "CACHE" ]; then - # Formatear sistema de ficheros. - ogUnmountCache 2>/dev/null - mkfs.ext4 -q -F $DEV -L "CACHE" -O extent,large_file 2>/dev/null || ogRaiseError $OG_ERR_PARTITION "CACHE" || return $? - # Crear estructura básica. - MNTDIR=$(ogMountCache) - mkdir -p $MNTDIR/$OGIMG - fi -else - # Error si no hay definida partición de caché. - DEV=$(ogFindCache) || ogRaiseError $OG_ERR_PARTITION "$MSG_NOCACHE" || return $? - DEV=$(ogDiskToDev $DEV) || return $? - # Formatear sistema de ficheros. - ogUnmountCache 2>/dev/null - mkfs.ext4 -q -F $DEV -L "CACHE" -O extent,large_file 2>/dev/null || ogRaiseError $OG_ERR_PARTITION "CACHE" || return $? - # Crear estructura básica. - MNTDIR=$(ogMountCache) - mkdir -p $MNTDIR/$OGIMG -fi -#agp +# Error si no hay definida partición de caché. +DEV=$(ogFindCache) || ogRaiseError $OG_ERR_PARTITION "$MSG_NOCACHE" || return $? +DEV=$(ogDiskToDev $DEV) || return $? + +# Formatear sistema de ficheros. +ogUnmountCache 2>/dev/null +mkfs.ext4 -q -F $DEV -L "CACHE" -O extent,large_file 2>/dev/null || ogRaiseError $OG_ERR_PARTITION "CACHE" || return $? + +# Crear estructura básica. +MNTDIR=$(ogMountCache) +mkdir -p $MNTDIR/$OGIMG } |