mirror of
https://github.com/smxi/inxi.git
synced 2025-01-19 00:47:47 +00:00
branch one, trying a fix for grsec kernels partition/disk odditities
This commit is contained in:
parent
db44237e68
commit
0351d39c60
9
inxi
9
inxi
|
@ -3,7 +3,7 @@
|
|||
#### Script Name: inxi
|
||||
#### Version: 1.9.8
|
||||
#### Date: June 14 2013
|
||||
#### Patch Number: 04-b1
|
||||
#### Patch Number: 05-b1
|
||||
########################################################################
|
||||
#### SPECIAL THANKS
|
||||
########################################################################
|
||||
|
@ -5003,7 +5003,8 @@ get_hdd_data_basic()
|
|||
next
|
||||
}
|
||||
# also handles odd dm-1 type, from lvm, and mdraid, and some other bsd partition syntax
|
||||
/^\/dev\/(mapper\/|[hsv]d[a-z][0-9]+|dm[-]?[0-9]+|ada[0-9]+p[0-9]+.*|md[0-9]+|[aw]d[0-9]+s.*)/ {
|
||||
# note that linux 3.2.45-grsec-9th types kernels have this type of partition name: /dev/xvdc (no number, letter)
|
||||
/^\/dev\/(mapper\/|[hsv]d[a-z][0-9]+|dm[-]?[0-9]+|ada[0-9]+p[0-9]+.*|md[0-9]+|[aw]d[0-9]+s.*|xvd[a-z])/ {
|
||||
# this handles the case where the first item is too long
|
||||
# and makes df wrap output to next line, so here we advance
|
||||
# it to the next line for that single case. Using df -P should
|
||||
|
@ -5060,8 +5061,8 @@ get_hdd_data_basic()
|
|||
# size += $3
|
||||
# }
|
||||
# special case from this data: 8 0 156290904 sda
|
||||
# note: vm has 252/253 known starter
|
||||
$1 ~ /^(3|8|22|33|252|253)$/ && $NF ~ /[hsv]d[a-z]$/ && ( $2 % 16 == 0 || $2 % 16 == 8 ) {
|
||||
# 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 ) {
|
||||
size += $3
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue