mirror of
https://github.com/smxi/inxi.git
synced 2024-11-17 00:31:19 +00:00
arch root fix
This commit is contained in:
parent
9d97e8e55b
commit
83878c2fa8
8
inxi
8
inxi
|
@ -1,7 +1,7 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
########################################################################
|
########################################################################
|
||||||
#### Script Name: inxi
|
#### Script Name: inxi
|
||||||
#### version: 0.9.10-b1-t5
|
#### version: 0.9.10-b1-t6
|
||||||
#### Date: 4 February 2009
|
#### Date: 4 February 2009
|
||||||
########################################################################
|
########################################################################
|
||||||
#### SPECIAL THANKS
|
#### SPECIAL THANKS
|
||||||
|
@ -2398,15 +2398,17 @@ get_partition_data_advanced()
|
||||||
}
|
}
|
||||||
|
|
||||||
# handle Arch /dev/root for / id
|
# handle Arch /dev/root for / id
|
||||||
|
# partition="root"
|
||||||
if ( partition == "root" ) {
|
if ( partition == "root" ) {
|
||||||
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 ~ /^[hs]d[a-z][0-9]+$/ ) {
|
if ( partTemp ~ /^[hs]d[a-z][0-9]+$/ ) {
|
||||||
partition=partTemp
|
partition=partTemp
|
||||||
}
|
}
|
||||||
else if ( partTemp ~ /[a-z]+-[a-z]+-[a-z]+/ ) {
|
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 )
|
||||||
}
|
}
|
||||||
else if ( partTemp != "" ) {
|
else if ( partTemp ~ /by-label/ ) {
|
||||||
label=gensub( /^(\/dev\/disk\/by-label\/)(.+)$/, "\\2", 1, partTemp )
|
label=gensub( /^(\/dev\/disk\/by-label\/)(.+)$/, "\\2", 1, partTemp )
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue