mirror of
https://github.com/smxi/inxi.git
synced 2025-01-31 10:02:18 +00:00
fixing convi bug now
This commit is contained in:
parent
eb820e9958
commit
17075eeaa8
16
inxi
16
inxi
|
@ -1,7 +1,7 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
########################################################################
|
########################################################################
|
||||||
#### Script Name: inxi
|
#### Script Name: inxi
|
||||||
#### version: 0.4.9
|
#### version: 0.4.10
|
||||||
#### Date: November 8 2008
|
#### Date: November 8 2008
|
||||||
########################################################################
|
########################################################################
|
||||||
#### inxi is a fork of infobash, the original bash sys info script by locsmif
|
#### inxi is a fork of infobash, the original bash sys info script by locsmif
|
||||||
|
@ -597,13 +597,8 @@ get_start_client()
|
||||||
elif [[ -n $PPID && -f /proc/$PPID/exe ]];then
|
elif [[ -n $PPID && -f /proc/$PPID/exe ]];then
|
||||||
irc_client_path=$( readlink /proc/$PPID/exe )
|
irc_client_path=$( readlink /proc/$PPID/exe )
|
||||||
irc_client_path_lower=$( tr '[:upper:]' '[:lower:]' <<< $irc_client_path )
|
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>
|
# from sidux infobash, handle bad detection of shell; Horst Tritremmel <hjt at sidux.com>
|
||||||
elif [[ ${irc_client_path_lower##*/} =~ dash|bash|sh ]]; then
|
if [[ ${irc_client_path_lower##*/} =~ dash|bash|sh ]]; then
|
||||||
# We want to know who wrapped it into the shell.
|
# We want to know who wrapped it into the shell.
|
||||||
PPPID="$( ps -p $PPID -o ppid --no-headers | sed 's/ //g' )"
|
PPPID="$( ps -p $PPID -o ppid --no-headers | sed 's/ //g' )"
|
||||||
if [[ -n $PPPID && -f /proc/$PPPID/exe ]];then
|
if [[ -n $PPPID && -f /proc/$PPPID/exe ]];then
|
||||||
|
@ -611,6 +606,13 @@ get_start_client()
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# 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'
|
||||||
|
fi
|
||||||
|
|
||||||
case $irc_client_path_lower in
|
case $irc_client_path_lower in
|
||||||
*irssi-text*|*irssi*)
|
*irssi-text*|*irssi*)
|
||||||
IRC_CLIENT_VERSION=" $( $irc_client_path -v | gawk 'NR == 1 { print $2 }' )"
|
IRC_CLIENT_VERSION=" $( $irc_client_path -v | gawk 'NR == 1 { print $2 }' )"
|
||||||
|
|
Loading…
Reference in a new issue