diff --git a/inxi b/inxi index 80fd06c..615f478 100755 --- a/inxi +++ b/inxi @@ -601,18 +601,20 @@ get_start_client() irc_client_path_lower=$( tr '[:upper:]' '[:lower:]' <<< $irc_client_path ) # from sidux infobash, handle bad detection of shell; Horst Tritremmel # note: do NOT put into '' or "" the dash|bash\perl stuff, otherwise the structure fails - # handles the xchat/sh/bash/dash cases, and the konversation perl cases - # 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 [[ ${irc_client_path_lower##*/} =~ dash|bash|sh|perl ]]; then - # 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 )" - irc_client_path_lower="$( tr '[:upper:]' '[:lower:]' <<< $irc_client_path )" - b_non_native_app='true' - fi - fi + # handles the xchat/sh/bash/dash cases, and the konversation/perl cases, where + # konversation reports itself as perl, which was missed because when konversation starts inxi + # 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. + 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 )" + irc_client_path_lower="$( tr '[:upper:]' '[:lower:]' <<< $irc_client_path )" + b_non_native_app='true' + fi + ;; + esac # replacing this fix with the one above, which is more globally affective # if [[ -z $( grep -i 'konversation' <<< $irc_client_path ) && -n $( grep -i 'perl' <<< $irc_client_path ) && -n $( pidof konversation ) ]];then # irc_client_path=$( which konversation )