adding username handling

This commit is contained in:
inxi-svn 2008-12-03 21:40:33 +00:00
parent 02c548a061
commit 2339a67c01

4
inxi
View file

@ -1933,7 +1933,9 @@ get_partition_data()
print $NF "," $(NF - 4) "," $(NF - 3) "," $(NF - 1) ",main" print $NF "," $(NF - 4) "," $(NF - 3) "," $(NF - 1) ",main"
} }
! /\/$|\/boot$|\/var$|\/home$|\/tmp$|\/usr$|tmpfs|udev|^filesystem/ && ! /aufs/ { ! /\/$|\/boot$|\/var$|\/home$|\/tmp$|\/usr$|tmpfs|udev|^filesystem/ && ! /aufs/ {
print $NF "," $(NF - 4) "," $(NF - 3) "," $(NF - 1) ",secondary" # cleaning up user name here to avoid showing too much info on irc
partitionName=gensub( /^\/home\/(.*)\/(.*)/, "/home/<username>/\\2", 1, $NF )
print partitionName "," $(NF - 4) "," $(NF - 3) "," $(NF - 1) ",secondary"
} }
' ) ' )
# now add the swap partition data, doesn't show percent used, someone can figure that in the future # now add the swap partition data, doesn't show percent used, someone can figure that in the future