From 7ab984dc694be220bc09a15e7632976b18fb172c Mon Sep 17 00:00:00 2001 From: Daniel STAN Date: Sun, 17 Mar 2013 13:42:35 +0100 Subject: [PATCH] [who2b/vo] fgconsole = tty en cours Par contre, fgconsole ne s'execute qu'en root --- gestion/tools/who2b | 2 +- gestion/tools/who2b.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/gestion/tools/who2b b/gestion/tools/who2b index 5df8027f..e68eb233 100755 --- a/gestion/tools/who2b +++ b/gestion/tools/who2b @@ -5,4 +5,4 @@ if [ `hostname` != "vo" ]; then exit 1 fi -sudo -u respbats /usr/scripts/gestion/tools/who2b.py +sudo -u root /usr/scripts/gestion/tools/who2b.py diff --git a/gestion/tools/who2b.py b/gestion/tools/who2b.py index a99b6218..265b3392 100755 --- a/gestion/tools/who2b.py +++ b/gestion/tools/who2b.py @@ -70,7 +70,7 @@ def liste_2b(): # Utilisateurs connectés sur vo sur place if gethostname() == 'vo': cprint('---=== W(ho) sur vo ===---', 'bleu') - ttyfound = system("/usr/bin/w -s | /bin/egrep 'tty0| :[0-9]+ | \(:[0-9]+'") + ttyfound = system("/usr/bin/w -s | grep tty`fgconsole`") print '' # Conclusion