mirror of
https://github.com/smxi/inxi.git
synced 2024-11-16 16:21:39 +00:00
Fixed small fredforfaen bug with /home being in name of path, but not being home, so checking now for starting with /home, /, /var etc
This commit is contained in:
parent
f039fb8b17
commit
2463b71ca8
5
inxi
5
inxi
|
@ -2330,13 +2330,10 @@ get_partition_data()
|
|||
}
|
||||
# skip all these, including the first, header line. Use the --exclude-type
|
||||
# to handle new filesystems types we do not want listed here
|
||||
! /\/$|\/boot$|\/var$|\/home$|\/tmp$|\/usr$|^filesystem/ {
|
||||
! /^\/$|^\/boot$|^\/var$|^\/home$|^\/tmp$|^\/usr$|^filesystem/ {
|
||||
# this is to avoid file systems with spaces in their names, that will make
|
||||
# the test show the wrong data in each of the fields, if no x%, then do not use
|
||||
if ( $(NF - 1) ~ /[0-9]+\%/ ) {
|
||||
# cleaning up user name here to avoid showing too much info on irc
|
||||
# partitionName=gensub( /^\/home\/(.*)\/(.*)/, "/home/###/\\2", 1, $NF )
|
||||
# print partitionName "," $(NF - 4) "," $(NF - 3) "," $(NF - 1) ",secondary"
|
||||
print $NF "," $(NF - 4) "," $(NF - 3) "," $(NF - 1) ",secondary"
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue