summaryrefslogtreecommitdiffstats
path: root/client/engine/Cache.lib
diff options
context:
space:
mode:
authorramon <ramongomez@us.es>2012-06-05 07:54:42 +0000
committerramon <ramongomez@us.es>2012-06-05 07:54:42 +0000
commit5af5d5f5f3497bc74cb17b41cc89db68c8bacbe2 (patch)
treefd13df5fc00209c5ecb2c2a0fff4e52ef289a459 /client/engine/Cache.lib
parent31c148d8e3e1da78ea52207db4737b08000fe2dd (diff)
Versión 1.0.4, #538: Redefinición de parámetros en función {{{ogTypeToId}}} y función {{{ogSetPartitionId}}} soporta discos GPT.
git-svn-id: https://opengnsys.es/svn/branches/version1.0@3141 a21b9725-9963-47de-94b9-378ad31fedc9
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
}