mirror of
https://github.com/smxi/inxi.git
synced 2025-01-19 00:47:47 +00:00
Fixed some more weaknesses with the client detection function.
This commit is contained in:
parent
e699488a94
commit
b1fa122748
11
inxi
11
inxi
|
@ -593,7 +593,7 @@ get_start_client()
|
|||
local b_non_native_app='false' pppid=''
|
||||
|
||||
if tty >/dev/null;then
|
||||
IRC_CLIENT="Shell"
|
||||
IRC_CLIENT='Shell'
|
||||
unset IRC_CLIENT_VERSION
|
||||
B_RUNNING_IN_SHELL='true'
|
||||
elif [[ -n $PPID && -f /proc/$PPID/exe ]];then
|
||||
|
@ -606,7 +606,7 @@ get_start_client()
|
|||
# from inside itself, as a script, the parent is konversation, not perl
|
||||
## note: this method: [[ ${irc_client_path_lower##*/} =~ dash|bash|sh|perl ]] fails in older bash, etch
|
||||
case ${irc_client_path_lower##*/} in
|
||||
dash|bash|sh|perl) # We want to know who wrapped it into the shell or perl.
|
||||
bash|dash|sh|perl) # We want to know who wrapped it into the shell or perl.
|
||||
pppid="$( ps -p $PPID -o ppid --no-headers | sed 's/ //g' )"
|
||||
if [[ -n $pppid && -f /proc/$pppid/exe ]];then
|
||||
irc_client_path="$( readlink /proc/$pppid/exe )"
|
||||
|
@ -735,8 +735,9 @@ get_start_client()
|
|||
}' )"
|
||||
IRC_CLIENT="Kopete"
|
||||
;;
|
||||
*perl*)
|
||||
unset IRC_CLIENT_VERSION # KSirc is one of the possibilities now. KSirc is a wrapper around dsirc, a perl client
|
||||
*perl*|*ksirc*|*dsirc*)
|
||||
unset IRC_CLIENT_VERSION
|
||||
# KSirc is one of the possibilities now. KSirc is a wrapper around dsirc, a perl client
|
||||
get_cmdline $PPID
|
||||
for (( i=0; i <= $CMDL_MAX; i++ ))
|
||||
do
|
||||
|
@ -764,7 +765,7 @@ get_start_client()
|
|||
IRC_CLIENT="Unknown Perl client"
|
||||
fi
|
||||
;;
|
||||
*bash*|*sh*)
|
||||
*bash*|*dash*|*sh*)
|
||||
unset IRC_CLIENT_VERSION
|
||||
IRC_CLIENT="Shell wrapper"
|
||||
;;
|
||||
|
|
Loading…
Reference in a new issue