mirror of
https://github.com/smxi/inxi.git
synced 2025-01-19 00:47:47 +00:00
Trying a sidux patch from infobash for the wrong output, shell instead of xchat etc
This commit is contained in:
parent
269d923b0f
commit
eb820e9958
11
inxi
11
inxi
|
@ -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*)
|
||||
|
|
Loading…
Reference in a new issue