mirror of
https://github.com/smxi/inxi.git
synced 2024-11-16 16:21:39 +00:00
branch one, trying a bug fix for another vm disk failure issue
This commit is contained in:
parent
8e765a8be8
commit
c9bdd0a982
31
inxi
31
inxi
|
@ -3,7 +3,7 @@
|
|||
#### Script Name: inxi
|
||||
#### Version: 1.9.8
|
||||
#### Date: June 14 2013
|
||||
#### Patch Number: 06-b1
|
||||
#### Patch Number: 01-b1
|
||||
########################################################################
|
||||
#### SPECIAL THANKS
|
||||
########################################################################
|
||||
|
@ -4989,8 +4989,7 @@ get_hdd_data_basic()
|
|||
fi
|
||||
hdd_data="$( eval $df_string )"
|
||||
log_function_data 'raw' "hdd_data:\n$hdd_data"
|
||||
|
||||
hdd_used=$( echo "$hdd_data" | gawk -v bsdType=$BSD_TYPE '
|
||||
hdd_used=$( echo "$hdd_data" | gawk -v bsdType=$BSD_TYPE '
|
||||
BEGIN {
|
||||
# this is used for specific cases where bind, or incorrect multiple mounts to same partitions,
|
||||
# is present. The value is searched for an earlier appearance of that partition and if it is
|
||||
|
@ -4998,9 +4997,11 @@ get_hdd_data_basic()
|
|||
partitionsSet=""
|
||||
# this handles a case where the same dev item is mounted twice to different points
|
||||
devSet=""
|
||||
devWorking=""
|
||||
mountWorking=""
|
||||
}
|
||||
# using $1, not $2, because older bsd df do not have -T, filesystem type
|
||||
( bsdType != "" ) && $1 ~ /^(aufs|devfs|devtmpfs|fdescfs|iso9660|linprocfs|procfs|squashfs|sysfs|tmpfs|type|unionfs)$/ {
|
||||
( bsdType != "" ) && $1 ~ /^(aufs|devfs|devtmpfs|fdescfs|filesystem|iso9660|linprocfs|procfs|squashfs|sysfs|tmpfs|type|unionfs)$/ {
|
||||
# note use next, not getline or it does not work right
|
||||
next
|
||||
}
|
||||
|
@ -5020,23 +5021,27 @@ get_hdd_data_basic()
|
|||
# this also protects against cases where the mount point has a space in the
|
||||
# file name, thus breaking going down from $NF directly.
|
||||
# some bsds will also have only 6 items
|
||||
if ( $5 ~ /.*%/ && devSet !~ /.*~$1~.*/ ) {
|
||||
if ( partitionsSet !~ /.*~$6~.*/ ) {
|
||||
if ( $5 ~ /.*%/ ) {
|
||||
devWorking="~" $1 "~"
|
||||
mountWorking="~" $6 "~"
|
||||
if ( partitionsSet !~ mountWorking && devSet !~ devWorking ) {
|
||||
used += $3
|
||||
}
|
||||
partitionsSet = partitionsSet "~" $6 "~"
|
||||
partitionsSet = partitionsSet mountWorking
|
||||
# make sure to only include bsd real lines here, ie, short df output
|
||||
if ( $1 ~ /\/dev\// ) {
|
||||
devSet = devSet "~" $1 "~"
|
||||
if ( $1 ~ /^\/dev\// ) {
|
||||
devSet = devSet devWorking
|
||||
}
|
||||
}
|
||||
# otherwise use standard
|
||||
else if ( $6 ~ /.*%/ ) {
|
||||
if ( partitionsSet !~ /.*~$7~.*/ && devSet !~ /.*~$1~.*/ ) {
|
||||
devWorking="~" $1 "~"
|
||||
mountWorking="~" $7 "~"
|
||||
if ( partitionsSet !~ mountWorking && devSet !~ devWorking ) {
|
||||
used += $4
|
||||
}
|
||||
partitionsSet = partitionsSet "~" $7 "~"
|
||||
devSet = devSet "~" $1 "~"
|
||||
partitionsSet = partitionsSet mountWorking
|
||||
devSet = devSet devWorking
|
||||
}
|
||||
# and if this is not detected, give up, we need user data to debug
|
||||
else {
|
||||
|
@ -5071,7 +5076,7 @@ get_hdd_data_basic()
|
|||
# }
|
||||
# special case from this data: 8 0 156290904 sda
|
||||
# note: vm has 252/253 known starter, grsec has 202
|
||||
$1 ~ /^(3|8|22|33|202|252|253)$/ && $NF ~ /[hsv]d[a-z]$/ && ( $2 % 16 == 0 || $2 % 16 == 8 ) {
|
||||
$1 ~ /^(3|8|22|33|202|252|253|254)$/ && $NF ~ /[hsv]d[a-z]$/ && ( $2 % 16 == 0 || $2 % 16 == 8 ) {
|
||||
size += $3
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue