diff options
author | ramon <ramongomez@us.es> | 2018-03-16 13:18:47 +0000 |
---|---|---|
committer | ramon <ramongomez@us.es> | 2018-03-16 13:18:47 +0000 |
commit | f408ce50920498114a9bbb3a28bd633beae9b401 (patch) | |
tree | a2d754b4b8ce738d1093434d38e0dd31ba3ff8b4 | |
parent | 3e80158e5acb3f7873884154218611cdd02d0532 (diff) |
#830: Función {{{ogGetDiskType}}} soporta discos NVM y propuesta para procesar discos a partir de {{{lsblk}}} con formato JSON.
git-svn-id: https://opengnsys.es/svn/branches/version1.1@5660 a21b9725-9963-47de-94b9-378ad31fedc9
-rwxr-xr-x | client/engine/Disk.lib | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/client/engine/Disk.lib b/client/engine/Disk.lib index 95c80f2e..3316d0d3 100755 --- a/client/engine/Disk.lib +++ b/client/engine/Disk.lib @@ -494,6 +494,7 @@ fi # Listar dispositivos de discos. ALLDISKS=$((lsblk -n -e 1,2 -x MAJ:MIN 2>/dev/null || lsblk -n -e 1,2) | \ awk '$6~/^disk$/ {gsub(/!/,"/"); printf "/dev/%s ",$1}') +#ALLDISKS=$(lsblk -Jd -e 1,2 | jq -r '.blockdevices[] | "/dev/"+select(.type=="disk").name') # Listar volúmenes lógicos. VOLGROUPS=$(vgs -a --noheadings 2>/dev/null | awk '{printf "/dev/%s ",$1}') ALLDISKS="$ALLDISKS $VOLGROUPS" @@ -652,6 +653,9 @@ case "$TYPE" in TYPE="DISK" udevadm info -q property $1 2>/dev/null | grep -q "^ID_BUS=usb" && TYPE="USB" ;; + BLKEXT) + TYPE="NVM" + ;; SR|IDE*) TYPE="CDROM" # FIXME Comprobar discos IDE. ;; |