URGENT BUG FIX! This fixes a bug introduced in 2.2.36 2016-03-21. New version, new tarball.

A sloppy unescaped / triggered a failure I didn't notice in partition info.

Please update your inxi packages immediately if your version is 2016-03-21 or newer.
This commit is contained in:
Harald Hope 2016-03-31 15:12:51 -07:00
parent 24b096a48e
commit dd67fd7cd1
2 changed files with 21 additions and 6 deletions

11
inxi
View file

@ -1,8 +1,8 @@
#!/usr/bin/env bash
########################################################################
#### Script Name: inxi
#### Version: 2.2.37
#### Date: 2016-03-30
#### Version: 2.2.38
#### Date: 2016-03-31
#### Patch Number: 00
########################################################################
#### SPECIAL THANKS
@ -7890,9 +7890,9 @@ get_partition_data()
if [[ $( grep -cs '[[:space:]]/$' <<< "$main_partition_data" ) -gt 1 ]];then
main_partition_data="$( grep -vs '^rootfs' <<< "$main_partition_data" )"
fi
# echo "$main_partition_data"
log_function_data 'raw' "main_partition_data_post_rootfs:\n$main_partition_data\n\nswap_data:\n$swap_data"
IFS=$'\n'
# sample line: /dev/sda2 ext3 15G 8.9G 4.9G 65% /home
# $NF = partition name; $(NF - 4) = partition size; $(NF - 3) = used, in gB; $(NF - 1) = percent used
## note: by subtracting from the last field number NF, we avoid a subtle issue with LVM df output, where if
## the first field is too long, it will occupy its own line, this way we are getting only the needed data
@ -7908,7 +7908,7 @@ get_partition_data()
( bsdType != "" ) {
# skip if non disk/partition, or if raid primary id, which will not have a / in it.
# Note: kfreebsd uses /sys, not sysfs, is this a bug or expected behavior?
if ( $1 ~ /^(aufs|devfs|devtmpfs|fdescfs|iso9660|linprocfs|procfs|squashfs|/sys|sysfs|tmpfs|type|unionfs)$/ ||
if ( $1 ~ /^(aufs|devfs|devtmpfs|fdescfs|iso9660|linprocfs|procfs|squashfs|\/sys|sysfs|tmpfs|type|unionfs)$/ ||
( $1 ~ /^([^\/]+)$/ && $1 !~ /^ROOT/ ) ) {
# note use next, not getline or it does not work right
next
@ -7994,7 +7994,6 @@ get_partition_data()
print $(NF - 2) " " $(NF - 1) " " $NF "," $(NF - 6) "," $(NF - 5) "," $(NF - 3) ",secondary," fileSystem "," devBase
}
}' )
# now add the swap partition data, don't want to show swap files, just partitions,
# though this can include /dev/ramzswap0. Note: you can also use /proc/swaps for this
# data, it's the same exact output as swapon -s
@ -8097,7 +8096,7 @@ get_partition_data()
fi
done
a_temp=${A_PARTITION_DATA[@]}
# echo $a_temp
# echo $a_temp;exit
log_function_data "2: A_PARTITION_DATA:\n$a_temp"
if [[ $B_SHOW_LABELS == 'true' || $B_SHOW_UUIDS == 'true' ]];then
get_partition_data_advanced

View file

@ -1,3 +1,19 @@
=====================================================================================
Version: 2.2.38
Patch Version: 00
Script Date: 2016-03-31
-----------------------------------
Changes:
-----------------------------------
URGENT BUG FIX! This fixes a bug introduced in 2.2.36 2016-03-21. New version, new tarball.
A sloppy unescaped / triggered a failure I didn't notice in partition info.
Please update your inxi packages immediately if your version is 2016-03-21 or newer.
-----------------------------------
-- Harald Hope - Thu, 31 Mar 2016 15:08:54 -0700
=====================================================================================
Version: 2.2.37
Patch Version: 00