mirror of
https://github.com/smxi/inxi.git
synced 2024-11-16 16:21:39 +00:00
quick bug fix, no version changes, handling su return value for shell parent, weird stuff.
Now will drill in until it hopefully gets su parent.
This commit is contained in:
parent
84137bfac8
commit
9ec6d89b08
5
inxi
5
inxi
|
@ -6692,6 +6692,11 @@ get_shell_parent()
|
||||||
|
|
||||||
script_parent=$( ps -fp $PPID --no-headers 2>/dev/null | awk '/'"$PPID"'/ { print $3 }' )
|
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}' )
|
shell_parent=$( ps -p $script_parent --no-headers 2>/dev/null | awk '/'"$script_parent"'/ { print $NF}' )
|
||||||
|
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 }' )
|
||||||
|
shell_parent=$( ps -p $script_parent --no-headers 2>/dev/null | awk '/'"$script_parent"'/ { print $NF}' )
|
||||||
|
fi
|
||||||
echo $shell_parent
|
echo $shell_parent
|
||||||
|
|
||||||
eval $LOGFE
|
eval $LOGFE
|
||||||
|
|
Loading…
Reference in a new issue