From b1fa1227489c3aae142d5bac82f0b1b8dcf47d01 Mon Sep 17 00:00:00 2001 From: inxi-svn Date: Sun, 9 Nov 2008 08:57:27 +0000 Subject: [PATCH] Fixed some more weaknesses with the client detection function. --- inxi | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/inxi b/inxi index 615f478..9b05346 100755 --- a/inxi +++ b/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" ;;