Trying a sidux patch from infobash for the wrong output, shell instead of xchat etc

This commit is contained in:
inxi-svn 2008-11-08 20:39:27 +00:00
parent 269d923b0f
commit eb820e9958

11
inxi
View file

@ -1,7 +1,7 @@
#!/bin/bash
########################################################################
#### Script Name: inxi
#### version: 0.4.8
#### version: 0.4.9
#### Date: November 8 2008
########################################################################
#### inxi is a fork of infobash, the original bash sys info script by locsmif
@ -596,13 +596,20 @@ get_start_client()
B_RUNNING_IN_SHELL='true'
elif [[ -n $PPID && -f /proc/$PPID/exe ]];then
irc_client_path=$( readlink /proc/$PPID/exe )
irc_client_path_lower=$( tr '[:upper:]' '[:lower:]' <<< $irc_client_path )
# this handles the problem with konversation reporting itself as perl, which was missed because
# when konversation starts inxi from inside itself, as a script, the parent is konversation, not perl
if [[ -z $( grep -i 'konversation' <<< $irc_client_path ) && -n $( grep -i 'perl' <<< $irc_client_path ) && -n $( pidof konversation ) ]];then
irc_client_path=$( which konversation )
non_native_konvi='true'
# from sidux infobash, handle bad detection of shell; Horst Tritremmel <hjt at sidux.com>
elif [[ ${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:]' )"
fi
fi
irc_client_path_lower=$( tr '[:upper:]' '[:lower:]' <<< $irc_client_path )
case $irc_client_path_lower in
*irssi-text*|*irssi*)