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 | |
---|
[6ddbb9e] | 9 | particiones=$(listPartitions 1 | wc -w) # Incluir todas las particiones |
---|
| 10 | cfg="0::::$(ogGetDiskSize 1);" # e información de disco (partición 0) |
---|
[3ec149c] | 11 | |
---|
[3998421] | 12 | for ((par=1;par<=$particiones;par++)); |
---|
| 13 | do |
---|
| 14 | # Tipo de partición o sistema de fichero |
---|
| 15 | fsi=$(getFsType 1 $par 2>/dev/null) |
---|
| 16 | fsi=${fsi:-"EMPTY"} |
---|
| 17 | # Código de la partición |
---|
| 18 | cod=$(ogFsToId $fsi) |
---|
| 19 | # Tamaño de la particón |
---|
| 20 | tam=$(ogGetPartitionSize 1 $par 2>/dev/null) |
---|
| 21 | tam=${tam:-"0"} |
---|
| 22 | # Sistema de fichero instalado |
---|
| 23 | if [ $cod == 82 ]; then |
---|
| 24 | soi=" " |
---|
| 25 | else |
---|
| 26 | soi=$(getOsVersion 1 $par 2>/dev/null | cut -f2 -d:) |
---|
| 27 | fi |
---|
[3ec149c] | 28 | |
---|
[3998421] | 29 | cfg="$cfg$par:$cod:$fsi:$soi:$tam;" |
---|
[3ec149c] | 30 | done |
---|
| 31 | |
---|
| 32 | echo $cfg | awk '{ |
---|
[3998421] | 33 | n=split($0,sep,";"); |
---|
| 34 | for(i=1;i<n;i++){ |
---|
| 35 | split(sep[i],dua,":"); |
---|
| 36 | printf("par=%s\tcpt=%s\tfsi=%s\tsoi=%s\ttam=%s\n",dua[1],dua[2],dua[3],dua[4],dua[5]); |
---|
| 37 | } |
---|
| 38 | }' |
---|
[3ec149c] | 39 | |
---|
| 40 | |
---|
Note: See
TracBrowser
for help on using the repository browser.