diff options
author | ramon <ramongomez@us.es> | 2016-06-01 09:50:56 +0000 |
---|---|---|
committer | ramon <ramongomez@us.es> | 2016-06-01 09:50:56 +0000 |
commit | 28aef0b976a991905692e60fe83cc7b7da3ed46d (patch) | |
tree | 2643b02363c5e2d8c573f619a95cbcf96d2e4d57 /client | |
parent | 13750f50b46f870eeb9f344d47906eb0c50b404d (diff) |
#730: Aplicar 2ª comprobación de tipo tabla de particiones para casos especiales (como discos con partición ZPOOL).
git-svn-id: https://opengnsys.es/svn/branches/version1.1@4951 a21b9725-9963-47de-94b9-378ad31fedc9
Diffstat (limited to 'client')
-rwxr-xr-x | client/engine/Disk.lib | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/client/engine/Disk.lib b/client/engine/Disk.lib index 35ad33be..66fa4f7a 100755 --- a/client/engine/Disk.lib +++ b/client/engine/Disk.lib @@ -852,7 +852,7 @@ esac #@return str_tabletype - Tipo de tabla de paritiones #@warning Salidas de errores no determinada #@note tabletype = { MSDOS, GPT } -#@note Requisitos: parted +#@note Requisitos: blkid, parted, vgs #@version 1.0.4 - Primera versión para OpenGnSys #@author Universidad de Huelva #@date 2012/03/01 @@ -881,7 +881,10 @@ fi DISK=$(ogDiskToDev $1) || return $? # Comprobar tabla de particiones. -[ -b $DISK ] && TYPE=$(blkid -s PTTYPE -o value $DISK | awk '{ if($1=="dos") print "MSDOS"; else print toupper($1)}') +if [ -b $DISK ]; then + TYPE=$(parted -sm $DISK print 2>/dev/null | awk -F: -v D=$DISK '{ if($1 == D) print toupper($6)}') + [ -z "$TYPE" ] && TYPE=$(parted -sm $DISK print 2>/dev/null | awk -F: -v D=$DISK '{ if($1 == D) print toupper($6)}') +fi # Comprobar si es volumen lógico. [ -d $DISK ] && vgs $DISK &>/dev/null && TYPE="LVM" # Comprobar si es pool de ZFS. |