summaryrefslogtreecommitdiffstats
path: root/client/engine/Cache.lib
diff options
context:
space:
mode:
authorramon <ramongomez@us.es>2012-06-04 09:05:46 +0000
committerramon <ramongomez@us.es>2012-06-04 09:05:46 +0000
commit21b4cb1de81c49a9f444b5cbdbaaf5430c727ac8 (patch)
tree906d078f139f2d233d1235a1168d1b2b944d9d71 /client/engine/Cache.lib
parentfe4f777d007676f149d4537c4f17dee77d275dd0 (diff)
VersiĆ³n 1.0.4, #540: Funciones {{{ogCreateCache}}} y {{{ogDeleteCache}}} detectan tipo de tabla de particiones.
git-svn-id: https://opengnsys.es/svn/branches/version1.0@3130 a21b9725-9963-47de-94b9-378ad31fedc9
Diffstat (limited to 'client/engine/Cache.lib')
-rwxr-xr-xclient/engine/Cache.lib6
1 files changed, 3 insertions, 3 deletions
diff --git a/client/engine/Cache.lib b/client/engine/Cache.lib
index a2d9ec46..22697788 100755
--- a/client/engine/Cache.lib
+++ b/client/engine/Cache.lib
@@ -31,7 +31,7 @@
function ogCreateCache ()
{
# Variables locales.
-local DISK PTTYPE PART START END ENDPREVPART SIZE MINSIZE MAXSIZE
+local DISK PART START END ENDPREVPART SIZE MINSIZE MAXSIZE
# Si se solicita, mostrar ayuda.
if [ "$*" == "help" ]; then
ogHelp "$FUNCNAME" "$FUNCNAME int_partsize" "$FUNCNAME 10000000"
@@ -58,7 +58,7 @@ ogUnmountAll 1 2>/dev/null
# Definir particiones y notificar al kernel.
# En el caso de ser disco GPT, de momento se borra la particion y se vuelve a crear por
# lo que se pierden los datos.
-case "$PTTYPE" in
+case "$(ogGetPartitionTableType $1)" in
GPT)
# Si la tabla de particiones no es valida, volver a generarla.
[ ! $(sgdisk -p $DISK 2>&1 >/dev/null) ] || echo -e "2\nw\nY\n" | gdisk $DISK
@@ -107,7 +107,7 @@ DISK=$(ogDiskToDev $NDISK)
# Desmontar todos los sistemas de archivos del disco.
ogUnmountAll $NDISK 2>/dev/null
-case "$PTTYPE" in
+case "$(ogGetPartitionTableType $1)" in
GPT)
# Si la tabla de particiones no es valida, volver a generarla.
[ ! $(sgdisk -p $DISK 2>&1 >/dev/null) ] || echo -e "2\nw\nY\n" | gdisk $DISK