final draft, should be good to go now

This commit is contained in:
inxi-svn 2009-02-05 01:12:27 +00:00
parent 29bd7429e9
commit aaaff711aa

14
inxi
View file

@ -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,12 +2400,12 @@ 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]+/ ) { else if ( partTemp ~ /by-uuid\/[a-z0-9]+-[a-z0-9]+-[a-z0-9]+/ ) {
uuid=gensub( /^(\/dev\/disk\/by-uuid\/)(.+)$/, "\\2", 1, partTemp ) 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 ) label=gensub( /^(\/dev\/disk\/by-label\/)(.+)$/, "\\2", 1, partTemp )
} }
} }
else {
partition = ""
label = ""
uuid = ""
}
}
print partition "," label "," uuid print partition "," label "," uuid
}' $DIR_MOUNTS ) }' $DIR_MOUNTS )