918-git-images-111dconfigfileconfigure-oglivegit-imageslgromero-new-oglivemainmaint-cronmount-efivarfsmultivmmultivm-ogboot-installerogClonningEngineogboot-installer-jenkinsoglive-ipv6test-python-scriptsticket-301ticket-50ticket-50-oldticket-577ticket-585ticket-611ticket-612ticket-693ticket-700ubu24tplunification2use-local-agent-oglivevarios-instalacionwebconsole3
Rev | Line | |
---|
[3ec149c] | 1 | #!/bin/bash |
---|
| 2 | |
---|
| 3 | #_______________________________________________________________________________________________________________________________ |
---|
| 4 | # |
---|
| 5 | # Formato de salida: |
---|
| 6 | # par=Número de particion\tcod=Código de partición\tsfi=Sistema de ficheros\tsoi=Sistema instalado\ttam=Tamaño de la partición\n |
---|
| 7 | #_______________________________________________________________________________________________________________________________ |
---|
| 8 | |
---|
[9bca594] | 9 | particiones=$(ogGetPartitionsNumber 1) # Incluir todas las particiones |
---|
[6ddbb9e] | 10 | cfg="0::::$(ogGetDiskSize 1);" # e información de disco (partición 0) |
---|
[3ec149c] | 11 | |
---|
[5804229] | 12 | for ((par=1;par<=$particiones;par++)); do |
---|
| 13 | # Código del identificador de tipo de partición |
---|
| 14 | cod=$(ogGetPartitionId 1 $par) |
---|
[3998421] | 15 | # Tipo de partición o sistema de fichero |
---|
| 16 | fsi=$(getFsType 1 $par 2>/dev/null) |
---|
| 17 | fsi=${fsi:-"EMPTY"} |
---|
| 18 | # Tamaño de la particón |
---|
| 19 | tam=$(ogGetPartitionSize 1 $par 2>/dev/null) |
---|
| 20 | tam=${tam:-"0"} |
---|
| 21 | # Sistema de fichero instalado |
---|
| 22 | if [ $cod == 82 ]; then |
---|
| 23 | soi=" " |
---|
| 24 | else |
---|
| 25 | soi=$(getOsVersion 1 $par 2>/dev/null | cut -f2 -d:) |
---|
| 26 | fi |
---|
[3ec149c] | 27 | |
---|
[3998421] | 28 | cfg="$cfg$par:$cod:$fsi:$soi:$tam;" |
---|
[3ec149c] | 29 | done |
---|
| 30 | |
---|
| 31 | echo $cfg | awk '{ |
---|
[3998421] | 32 | n=split($0,sep,";"); |
---|
[5804229] | 33 | for (i=1; i<n; i++){ |
---|
| 34 | split (sep[i],dua,":"); |
---|
| 35 | printf ("par=%s\tcpt=%s\tfsi=%s\tsoi=%s\ttam=%s\n", |
---|
| 36 | dua[1],dua[2],dua[3],dua[4],dua[5]); |
---|
[3998421] | 37 | } |
---|
| 38 | }' |
---|
[3ec149c] | 39 | |
---|
| 40 | |
---|
Note: See
TracBrowser
for help on using the repository browser.