From 3cb1cc8d1a8897db2dfe562323d1c37ad4db4894 Mon Sep 17 00:00:00 2001 From: inxi-svn Date: Sun, 9 Nov 2008 03:45:36 +0000 Subject: [PATCH] Fixed bug with xchat gnome handling, my error --- inxi | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/inxi b/inxi index 0e76872..63b1d3f 100755 --- a/inxi +++ b/inxi @@ -1,7 +1,7 @@ #!/bin/bash ######################################################################## #### Script Name: inxi -#### version: 0.4.16 +#### version: 0.4.17 #### Date: November 8 2008 ######################################################################## #### inxi is a fork of infobash, the original bash sys info script by locsmif @@ -598,11 +598,20 @@ get_start_client() irc_client_path=$( readlink /proc/$PPID/exe ) irc_client_path_lower=$( tr '[:upper:]' '[:lower:]' <<< $irc_client_path ) # from sidux infobash, handle bad detection of shell; Horst Tritremmel + echo irc_client_path $irc_client_path + echo irc_client_path_lower $irc_client_path_lower + echo pspppid:$(ps -p $PPID -o ppid --no-headers | sed 's/ //g'): + echo irc_client_path_lower::: ${irc_client_path_lower##*/} + [[ ${irc_client_path_lower##*/} =~ dash|bash|sh ]] && echo yes || echo no + exit + + # note: do NOT put into '' or "" the dash|bash stuff, otherwise the structure fails if [[ ${irc_client_path_lower##*/} =~ dash|bash|sh ]]; then # We want to know who wrapped it into the shell. PPPID="$( ps -p $PPID -o ppid --no-headers | sed 's/ //g' )" if [[ -n $PPPID && -f /proc/$PPPID/exe ]];then - irc_client_path_lower="$( readlink /proc/$PPPID/exe | tr '[:upper:]' '[:lower:]' )" + irc_client_path="$( readlink /proc/$PPPID/exe )" + irc_client_path_lower="$( tr '[:upper:]' '[:lower:]' <<< $irc_client_path )" fi fi @@ -1265,7 +1274,7 @@ get_hard_drive_data_advanced() #c=gensub(/^ *vendor: (.+) +model: (.+) +rev: (.+)$/,"\\1 \\2 \\3","g",a[i]) #c=gensub( /^ *vendor: (.+) +model: (.+) +rev:.*$/,"\\1 \\2","g",a[i] ) # the vendor: string is useless, and is a bug, ATA is not a vendor for example - c=gensub( /^ *vendor: (.+) +model: (.+) +rev:.*$/,"\\2","g",a[i] ) + c=gensub( /^ *vendor: (.+) +model: (.+) +rev:.*$/, "\\2", "g", a[i] ) gsub(/,/, " ", c) gsub(/^ +| +$/, "", c) gsub(/ [ \t]+/, " ", c)