(change version)

fixed bug with strange partition data wrapping in df, should now show root again in fringe cases
This commit is contained in:
inxi-svn 2009-03-02 01:55:48 +00:00
parent 63316984f3
commit 18c22cbadf

15
inxi
View file

@ -1,7 +1,7 @@
#!/bin/bash #!/bin/bash
######################################################################## ########################################################################
#### Script Name: inxi #### Script Name: inxi
#### version: 1.0.4 #### version: 1.0.5
#### Date: 1 March 2009 #### Date: 1 March 2009
######################################################################## ########################################################################
#### SPECIAL THANKS #### SPECIAL THANKS
@ -2375,17 +2375,17 @@ get_partition_data()
BEGIN { BEGIN {
IGNORECASE=1 IGNORECASE=1
} }
# this handles yet another fredforfaen special case where a mounted drive
# has the search string in its name
$NF ~ /^\/$|^\/boot$|^\/var$|^\/home$|^\/tmp$|^\/usr$/ && ! /aufs/ {
print $NF "," $(NF - 4) "," $(NF - 3) "," $(NF - 1) ",main"
}
# this is required because below we are subtracting from NF, so it has to be # this is required because below we are subtracting from NF, so it has to be
# > 1, actually greater than 4, but that is so unlikely to occur because # > 1, actually greater than 4, but that is so unlikely to occur because
# the real issue is long file system names that force the wrap of df output: //fileserver/main # the real issue is long file system names that force the wrap of df output: //fileserver/main
( NF == 1 ) { ( NF < 5 ) && ( $0 !~ /[0-9]+\%/ ) {
getline getline
} }
# this handles yet another fredforfaen special case where a mounted drive
# has the search string in its name
$NF ~ /^\/$|^\/boot$|^\/var$|^\/home$|^\/tmp$|^\/usr$/ {
print $NF "," $(NF - 4) "," $(NF - 3) "," $(NF - 1) ",main"
}
# skip all these, including the first, header line. Use the --exclude-type # skip all these, including the first, header line. Use the --exclude-type
# to handle new filesystems types we do not want listed here # to handle new filesystems types we do not want listed here
$NF !~ /^\/$|^\/boot$|^\/var$|^\/home$|^\/tmp$|^\/usr$|^filesystem/ { $NF !~ /^\/$|^\/boot$|^\/var$|^\/home$|^\/tmp$|^\/usr$|^filesystem/ {
@ -3300,6 +3300,7 @@ print_partition_data()
dev_remote='remote' dev_remote='remote'
fi fi
else else
dev_remote='dev'
part_dev='N/A' part_dev='N/A'
fi fi
full_dev=" ${C1}$dev_remote:${C2} $part_dev" full_dev=" ${C1}$dev_remote:${C2} $part_dev"