From 51a4fe943212c49cea9e10fd0ed9f4919965d75c Mon Sep 17 00:00:00 2001 From: inxi-svn Date: Sat, 25 Jun 2011 04:08:13 +0000 Subject: [PATCH] added newlines to sensors output to make sure sensors always work --- inxi | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/inxi b/inxi index 6bb25d0..5261a18 100755 --- a/inxi +++ b/inxi @@ -3,7 +3,7 @@ #### Script Name: inxi #### version: 1.7.12 #### Date: June 24 2011 -#### Patch Number: 01 +#### Patch Number: 02 ######################################################################## #### SPECIAL THANKS ######################################################################## @@ -5699,10 +5699,15 @@ get_sensors_data() get_sensors_output() { - local sensors_path=$( type -p sensors ) + local sensors_path=$( type -p sensors ) sensors_data='' + if [[ -n $sensors_path ]];then - $sensors_path 2>/dev/null + sensors_data="$( $sensors_path 2>/dev/null )" + if [[ -n "$sensors_data" ]];then + sensors_data="$sensors_data\n\n" # make sure the file ends in newlines + fi fi + echo -e "$sensors_data" } get_unmounted_partition_data()