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:
inxi-svn 2009-02-11 17:58:19 +00:00
parent f039fb8b17
commit 2463b71ca8

5
inxi
View file

@ -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"
}
}