faster TTY grab
This commit is contained in:
parent
3b6d8c8e68
commit
6f0bf08f61
@ -273,7 +273,7 @@ __user()
|
|||||||
|
|
||||||
__connection()
|
__connection()
|
||||||
{
|
{
|
||||||
THIS_TTY=tty$(ps aux | awk -v pid=$$ '$0 ~ pid && /bash/{ print $7 }')
|
THIS_TTY=$(awk -v pid=$$ '$0 ~ pid && /bash/{ print $7 }' < <(ps aux) )
|
||||||
SESS_SRC=$(who | awk -v thistty="$THIS_TTY" '$0 ~ thistty { print $6 }')
|
SESS_SRC=$(who | awk -v thistty="$THIS_TTY" '$0 ~ thistty { print $6 }')
|
||||||
|
|
||||||
# Are we in an SSH connexion?
|
# Are we in an SSH connexion?
|
||||||
|
Loading…
Reference in New Issue
Block a user