close
Warning:
Failed to sync with repository "ogBrowser-Git": (1366, "Incorrect string value: '\\xF0\\x9F\\x93\\xA6 I...' for column 'message' at row 1"); repository information may be out of date. Look in the Trac log for more information including mitigation strategies.
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
| Line | |
|---|
| 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 | |
|---|
| 9 | cfg=$(listPrimaryPartitions 1) |
|---|
| 10 | particiones=$(echo $cfg | awk '{n=split($0,sep," ");print n}') |
|---|
| 11 | cfg="" |
|---|
| 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 | # Tamaño de la particón |
|---|
| 18 | tam=$(ogGetPartitionSize 1 $par 2>/dev/null) |
|---|
| 19 | tam=${tam:-"0"} |
|---|
| 20 | # Código de la partición |
|---|
| 21 | cod=$(ogFsToId $fsi) |
|---|
| 22 | |
|---|
| 23 | |
|---|
| 24 | if [ $cod == 82 ]; then |
|---|
| 25 | soi=" " |
|---|
| 26 | else |
|---|
| 27 | # Sistema de fichero instalado |
|---|
| 28 | soi=$(getOsVersion 1 $par 2>/dev/null) |
|---|
| 29 | soi=$(echo $soi | awk '{split($0,sep,":"); print sep[2]}') |
|---|
| 30 | fi |
|---|
| 31 | |
|---|
| 32 | cfg=$(echo $cfg$par":"$cod":"$fsi":"$soi":"$tam";") |
|---|
| 33 | |
|---|
| 34 | done |
|---|
| 35 | |
|---|
| 36 | echo $cfg | awk '{ |
|---|
| 37 | n=split($0,sep,";"); |
|---|
| 38 | for(i=1;i<n;i++){ |
|---|
| 39 | split(sep[i],dua,":"); |
|---|
| 40 | printf("par=%s\tcpt=%s\tfsi=%s\tsoi=%s\ttam=%s\n",dua[1],dua[2],dua[3],dua[4],dua[5]); |
|---|
| 41 | } |
|---|
| 42 | |
|---|
| 43 | }' |
|---|
| 44 | |
|---|
| 45 | |
|---|
Note: See
TracBrowser
for help on using the repository browser.