Fixed bug with xchat gnome handling, my error

This commit is contained in:
inxi-svn 2008-11-09 03:45:36 +00:00
parent b27b6507a1
commit 3cb1cc8d1a

15
inxi
View file

@ -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 <hjt at sidux.com>
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)