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
14
inxi
14
inxi
|
@ -1,7 +1,7 @@
|
|||
#!/bin/bash
|
||||
########################################################################
|
||||
#### Script Name: inxi
|
||||
#### version: 0.9.10-b1-t6
|
||||
#### version: 0.10.0-b1-t6
|
||||
#### Date: 4 February 2009
|
||||
########################################################################
|
||||
#### SPECIAL THANKS
|
||||
|
@ -2400,12 +2400,12 @@ get_partition_data_advanced()
|
|||
}
|
||||
|
||||
# handle Arch /dev/root for / id
|
||||
# partition="root"
|
||||
if ( partition == "root" ) {
|
||||
# if this works, great, otherwise, just set this to null values
|
||||
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]+$/ ) {
|
||||
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 )
|
||||
|
@ -2414,6 +2414,12 @@ get_partition_data_advanced()
|
|||
label=gensub( /^(\/dev\/disk\/by-label\/)(.+)$/, "\\2", 1, partTemp )
|
||||
}
|
||||
}
|
||||
else {
|
||||
partition = ""
|
||||
label = ""
|
||||
uuid = ""
|
||||
}
|
||||
}
|
||||
print partition "," label "," uuid
|
||||
}' $DIR_MOUNTS )
|
||||
|
||||
|
|
Loading…
Reference in a new issue