From 9515a5ab0044aaf69d0b0428df92b3176c3ca6cd Mon Sep 17 00:00:00 2001 From: inxi-svn Date: Tue, 29 Jan 2013 00:37:01 +0000 Subject: [PATCH] added a comment to explain the hack for su/process grandparent --- inxi | 1 + 1 file changed, 1 insertion(+) diff --git a/inxi b/inxi index 955b7c0..14cfc09 100755 --- a/inxi +++ b/inxi @@ -6692,6 +6692,7 @@ get_shell_parent() script_parent=$( ps -fp $PPID --no-headers 2>/dev/null | awk '/'"$PPID"'/ { print $3 }' ) shell_parent=$( ps -p $script_parent --no-headers 2>/dev/null | awk '/'"$script_parent"'/ { print $NF}' ) + # no idea why have to do script_parent action twice in su case, but you do, oh well. if [[ $shell_parent == 'su' ]];then script_parent=$( ps -fp $script_parent --no-headers 2>/dev/null | awk '/'"$script_parent"'/ { print $3 }' ) script_parent=$( ps -fp $script_parent --no-headers 2>/dev/null | awk '/'"$script_parent"'/ { print $3 }' )