summaryrefslogtreecommitdiffstats
path: root/client/engine/Cache.lib
diff options
context:
space:
mode:
Diffstat (limited to 'client/engine/Cache.lib')
-rwxr-xr-xclient/engine/Cache.lib7
1 files changed, 4 insertions, 3 deletions
diff --git a/client/engine/Cache.lib b/client/engine/Cache.lib
index 22697788..64196620 100755
--- a/client/engine/Cache.lib
+++ b/client/engine/Cache.lib
@@ -31,7 +31,7 @@
function ogCreateCache ()
{
# Variables locales.
-local DISK PART START END ENDPREVPART SIZE MINSIZE MAXSIZE
+local DISK PART START END ENDPREVPART SIZE MINSIZE MAXSIZE ID
# Si se solicita, mostrar ayuda.
if [ "$*" == "help" ]; then
ogHelp "$FUNCNAME" "$FUNCNAME int_partsize" "$FUNCNAME 10000000"
@@ -65,14 +65,15 @@ case "$(ogGetPartitionTableType $1)" in
# Si existe la cache se borra previamente
[ -n $(ogFindCache) && ogDeleteCache
# Capturamos el codigo de particion GPT para cache
- ID=$(ogTypeToId CACHE)
+ ID=$(ogTypeToId CACHE GPT)
sgdisk $DISK -n$PART:$START:$END -c$PART:CACHE -t$PART:$ID 2>/dev/null && partprobe
;;
MSDOS)
# Si la tabla de particiones no es valida, volver a generarla.
[ $(parted -s $DISK print >/dev/null) ] || fdisk $DISK <<< "w"
# Definir particiones y notificar al kernel.
- sfdisk -f $DISK -uS -N$PART <<<"$START,$SIZE,ca" 2>/dev/null && partprobe
+ ID=$(ogTypeToId CACHE MSDOS)
+ sfdisk -f $DISK -uS -N$PART <<<"$START,$SIZE,$ID" 2>/dev/null && partprobe
;;
esac
}