From dd67fd7cd1d36dfd4437ca41de1735a0c32c8cec Mon Sep 17 00:00:00 2001 From: Harald Hope Date: Thu, 31 Mar 2016 15:12:51 -0700 Subject: [PATCH] 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. --- inxi | 11 +++++------ inxi.changelog | 16 ++++++++++++++++ 2 files changed, 21 insertions(+), 6 deletions(-) diff --git a/inxi b/inxi index 5341a00..a5ad75f 100755 --- a/inxi +++ b/inxi @@ -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 diff --git a/inxi.changelog b/inxi.changelog index 1e9a006..73dd72c 100755 --- a/inxi.changelog +++ b/inxi.changelog @@ -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