mirror of
https://github.com/smxi/inxi.git
synced 2024-11-17 00:31:19 +00:00
branches/one arch compatible now? let's see
This commit is contained in:
parent
6f94b59e1f
commit
cee0dd4867
26
inxi
26
inxi
|
@ -1,7 +1,7 @@
|
|||
#!/bin/bash
|
||||
########################################################################
|
||||
#### Script Name: inxi
|
||||
#### version: 0.9.10-b1-t1
|
||||
#### version: 0.9.10-b1-t2
|
||||
#### Date: 4 February 2009
|
||||
########################################################################
|
||||
#### SPECIAL THANKS
|
||||
|
@ -2376,10 +2376,16 @@ get_partition_data_advanced()
|
|||
#echo mount_point $mount_point
|
||||
dev_partition_data=$( gawk '
|
||||
BEGIN {
|
||||
label = ""
|
||||
uuid = ""
|
||||
IGNORECASE = 1
|
||||
partition = ""
|
||||
partTemp = ""
|
||||
}
|
||||
/[ \t]'$mount_point'[ \t]/ && $1 != "rootfs" {
|
||||
# initialize the variables
|
||||
label = ""
|
||||
uuid = ""
|
||||
|
||||
# slice out the /dev
|
||||
partition=gensub( /^(\/dev\/)(.+)$/, "\\2", 1, $1 )
|
||||
# label and uuid can occur for root
|
||||
if ( partition ~ /by-label/ ) {
|
||||
|
@ -2393,7 +2399,19 @@ get_partition_data_advanced()
|
|||
if ( partition ~ /disk/ ) {
|
||||
partition = ""
|
||||
}
|
||||
#print $1 "," label "," uuid
|
||||
# handle Arch /dev/root for / id
|
||||
if ( partition == "root" ) {
|
||||
partTemp='$(readlink /dev/root)'
|
||||
if ( partTemp ~ /^[hs]d[a-z][0-9]+$/ ) {
|
||||
partition=partTemp
|
||||
}
|
||||
else if ( partTemp ~ /[a-z]+-[a-z]+-[a-z]+/ ) {
|
||||
uuid=partTemp
|
||||
}
|
||||
else if ( partTemp != "" ) {
|
||||
label=partTemp
|
||||
}
|
||||
}
|
||||
print partition "," label "," uuid
|
||||
}' $DIR_MOUNTS )
|
||||
|
||||
|
|
Loading…
Reference in a new issue