Feature #969
/usr/LH/bin/idle.sh have error to Check for user logins option -l
Status: | Closed | Start date: | 05/13/2014 | |
---|---|---|---|---|
Priority: | Normal | Due date: | ||
Assignee: | brfransen | % Done: | 100% |
|
Category: | Packages: Core | Spent time: | - | |
Target version: | 8.2 |
Description
Hi,
I check the /usr/LH/bin/idle.sh with the option "-l" for check for user logins.
The user "root" is login over a ssh session, but the script do not check this login user!
This this the error:
root@sbx1 bin]# ./idle.sh -l
Checking what MythTV is doing now or plans to within 20 minutes...
Shutdown is locked
mythshutdown returned 16
including daily wake, locked, and about to start wake as system idle
mythshutdown returned 0
schemalock 0
running jobs 0
inuse programs 0
planned recordings 0
hdtv01 is NOT playing a recording or video 0
sbx1 is NOT playing a recording or video 0
./idle.sh: line 115: /bin/grep: No such file or directory
No users are logged in 0
System is idle
But the System is busy, the user "root" is login.
To fix this, please change the line 115
from
USERS=`/usr/bin/last | /bin/grep "still logged in" | awk '{ print $1 }'`
to
USERS=`/usr/bin/last | /usr/bin/grep "still logged in" | /usr/bin/awk '{ print $1 }'`
Regards Lutz
Related issues
related to LinHES - Feature #958: remove/replace scripts in /usr/LH/bin that directly acces... | Closed | 02/05/2014 |
Associated revisions
LinHES-system: idle.py: add option to check user logins. closes #969
History
Updated by brfransen over 10 years ago
- Assignee set to brfransen
idle.sh has been removed from testing (which will become R8.2) and replaced with idle.py. See #958. However, idle.py doesn't implement a user login check currently.
Updated by brfransen over 10 years ago
- Tracker changed from Bug to Feature
Updated by brfransen over 10 years ago
- Target version set to 8.2
Updated by brfransen over 10 years ago
- % Done changed from 0 to 100
- Status changed from New to Closed
Applied in changeset 9e73f8ae6c7d9800b6fc643fc143f40549fac609.