mirror of
https://github.com/smxi/inxi.git
synced 2025-01-19 08:57:57 +00:00
New version, tarball. This fixes a bug where if there is a remote filesystem mounted, the path
would crash gawk when searching for unumounted file systems, eg: 12.34.2.10:/remote/file/system Fix is to escape '/'.
This commit is contained in:
parent
33fe10f7ca
commit
847ba186a0
13
inxi
13
inxi
|
@ -1,8 +1,8 @@
|
||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
########################################################################
|
########################################################################
|
||||||
#### Script Name: inxi
|
#### Script Name: inxi
|
||||||
#### Version: 2.3.24
|
#### Version: 2.3.25
|
||||||
#### Date: 2017-07-23
|
#### Date: 2017-07-24
|
||||||
#### Patch Number: 00
|
#### Patch Number: 00
|
||||||
########################################################################
|
########################################################################
|
||||||
#### SPECIAL THANKS
|
#### SPECIAL THANKS
|
||||||
|
@ -6332,7 +6332,7 @@ get_graphics_card_data()
|
||||||
# cards are either the same or different. We want only the .0 version as a valid
|
# cards are either the same or different. We want only the .0 version as a valid
|
||||||
# card. .1 would be for example: Display Adapter with bus id x:xx.1, not the right one
|
# card. .1 would be for example: Display Adapter with bus id x:xx.1, not the right one
|
||||||
/vga compatible controller|3D controller|Display controller/ {
|
/vga compatible controller|3D controller|Display controller/ {
|
||||||
trueCard=""
|
driver=""
|
||||||
gsub(/'"$BAN_LIST_NORMAL"'/, "", $NF)
|
gsub(/'"$BAN_LIST_NORMAL"'/, "", $NF)
|
||||||
gsub(/'"$BAN_LIST_ARRAY"'/, " ", $NF)
|
gsub(/'"$BAN_LIST_ARRAY"'/, " ", $NF)
|
||||||
gsub(/^ +| +$/, "", $NF)
|
gsub(/^ +| +$/, "", $NF)
|
||||||
|
@ -8703,7 +8703,7 @@ get_partition_data()
|
||||||
# added devfs linprocfs sysfs fdescfs which show on debian kfreebsd kernel output
|
# added devfs linprocfs sysfs fdescfs which show on debian kfreebsd kernel output
|
||||||
if [[ -z $BSD_TYPE ]];then
|
if [[ -z $BSD_TYPE ]];then
|
||||||
swap_data="$( swapon -s 2>/dev/null )"
|
swap_data="$( swapon -s 2>/dev/null )"
|
||||||
df_string='df -h -T -P --exclude-type=aufs --exclude-type=devfs --exclude-type=devtmpfs
|
df_string=' --exclude-type=aufs --exclude-type=devfs --exclude-type=devtmpfs
|
||||||
--exclude-type=fdescfs --exclude-type=iso9660 --exclude-type=linprocfs --exclude-type=procfs
|
--exclude-type=fdescfs --exclude-type=iso9660 --exclude-type=linprocfs --exclude-type=procfs
|
||||||
--exclude-type=squashfs --exclude-type=sysfs --exclude-type=tmpfs --exclude-type=unionfs'
|
--exclude-type=squashfs --exclude-type=sysfs --exclude-type=tmpfs --exclude-type=unionfs'
|
||||||
else
|
else
|
||||||
|
@ -11459,7 +11459,8 @@ get_unmounted_partition_data()
|
||||||
a_unmounted_working=( ${A_PARTITION_DATA[i]} )
|
a_unmounted_working=( ${A_PARTITION_DATA[i]} )
|
||||||
IFS="$ORIGINAL_IFS"
|
IFS="$ORIGINAL_IFS"
|
||||||
if [[ -n ${a_unmounted_working[6]} ]];then
|
if [[ -n ${a_unmounted_working[6]} ]];then
|
||||||
mounted_partitions="$mounted_partitions$separator${a_unmounted_working[6]}"
|
# for remote mounts, the path would be: [domain|ip]:/path/in/remote
|
||||||
|
mounted_partitions="$mounted_partitions$separator${a_unmounted_working[6]//\//\\/}"
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
# now we need to exclude the mdraid partitions from the unmounted partition output as well
|
# now we need to exclude the mdraid partitions from the unmounted partition output as well
|
||||||
|
@ -11482,7 +11483,7 @@ get_unmounted_partition_data()
|
||||||
# note that size 1 means it is a logical extended partition container
|
# note that size 1 means it is a logical extended partition container
|
||||||
# lvm might have dm-1 type syntax
|
# lvm might have dm-1 type syntax
|
||||||
# need to exclude loop type file systems, squashfs for example
|
# need to exclude loop type file systems, squashfs for example
|
||||||
/[a-z][0-9]+$|dm-[0-9]+$/ && $3 != 1 && $NF !~ /loop/ && $NF !~ /('$mounted_partitions')/ {
|
/[a-z][0-9]+$|dm-[0-9]+$/ && $3 != 1 && $NF !~ /loop/ && $NF !~ /'$mounted_partitions'/ {
|
||||||
size = sprintf( "%.2f", $3*1024/1000**3 )
|
size = sprintf( "%.2f", $3*1024/1000**3 )
|
||||||
print $4 "," size "G"
|
print $4 "," size "G"
|
||||||
}' $FILE_PARTITIONS ) )
|
}' $FILE_PARTITIONS ) )
|
||||||
|
|
|
@ -1,3 +1,20 @@
|
||||||
|
=====================================================================================
|
||||||
|
Version: 2.3.25
|
||||||
|
Patch Version: 00
|
||||||
|
Script Date: 2017-07-24
|
||||||
|
-----------------------------------
|
||||||
|
Changes:
|
||||||
|
-----------------------------------
|
||||||
|
New version, tarball. This fixes a bug where if there is a remote filesystem mounted, the path
|
||||||
|
would crash gawk when searching for unumounted file systems, eg:
|
||||||
|
|
||||||
|
12.34.2.10:/remote/file/system
|
||||||
|
|
||||||
|
Fix is to escape '/'.
|
||||||
|
|
||||||
|
-----------------------------------
|
||||||
|
-- Harald Hope - Mon, 24 Jul 2017 21:10:54 -0700
|
||||||
|
|
||||||
=====================================================================================
|
=====================================================================================
|
||||||
Version: 2.3.24
|
Version: 2.3.24
|
||||||
Patch Version: 00
|
Patch Version: 00
|
||||||
|
|
Loading…
Reference in a new issue