mirror of
https://github.com/smxi/inxi.git
synced 2024-11-17 00:31:19 +00:00
final draft, should be good to go now
This commit is contained in:
parent
29bd7429e9
commit
aaaff711aa
26
inxi
26
inxi
|
@ -1,7 +1,7 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
########################################################################
|
########################################################################
|
||||||
#### Script Name: inxi
|
#### Script Name: inxi
|
||||||
#### version: 0.9.10-b1-t6
|
#### version: 0.10.0-b1-t6
|
||||||
#### Date: 4 February 2009
|
#### Date: 4 February 2009
|
||||||
########################################################################
|
########################################################################
|
||||||
#### SPECIAL THANKS
|
#### SPECIAL THANKS
|
||||||
|
@ -2400,18 +2400,24 @@ get_partition_data_advanced()
|
||||||
}
|
}
|
||||||
|
|
||||||
# handle Arch /dev/root for / id
|
# handle Arch /dev/root for / id
|
||||||
# partition="root"
|
|
||||||
if ( partition == "root" ) {
|
if ( partition == "root" ) {
|
||||||
|
# if this works, great, otherwise, just set this to null values
|
||||||
partTemp="'$( readlink /dev/root 2>/dev/null )'"
|
partTemp="'$( readlink /dev/root 2>/dev/null )'"
|
||||||
# partTemp="/dev/disk/by-uuid/7b67bf1e-626d-43d2-9885-1d1bbae26809"
|
if ( partTemp != "" ) {
|
||||||
if ( partTemp ~ /^[hs]d[a-z][0-9]+$/ ) {
|
if ( partTemp ~ /^[hs]d[a-z][0-9]+$/ ) {
|
||||||
partition=partTemp
|
partition=gensub( /^(\/dev\/)(.+)$/, "\\2", 1, partTemp )
|
||||||
|
}
|
||||||
|
else if ( partTemp ~ /by-uuid\/[a-z0-9]+-[a-z0-9]+-[a-z0-9]+/ ) {
|
||||||
|
uuid=gensub( /^(\/dev\/disk\/by-uuid\/)(.+)$/, "\\2", 1, partTemp )
|
||||||
|
}
|
||||||
|
else if ( partTemp ~ /by-label/ ) {
|
||||||
|
label=gensub( /^(\/dev\/disk\/by-label\/)(.+)$/, "\\2", 1, partTemp )
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else if ( partTemp ~ /by-uuid\/[a-z0-9]+-[a-z0-9]+-[a-z0-9]+/ ) {
|
else {
|
||||||
uuid=gensub( /^(\/dev\/disk\/by-uuid\/)(.+)$/, "\\2", 1, partTemp )
|
partition = ""
|
||||||
}
|
label = ""
|
||||||
else if ( partTemp ~ /by-label/ ) {
|
uuid = ""
|
||||||
label=gensub( /^(\/dev\/disk\/by-label\/)(.+)$/, "\\2", 1, partTemp )
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
print partition "," label "," uuid
|
print partition "," label "," uuid
|
||||||
|
|
Loading…
Reference in a new issue