Hi,

In order to log the logintime for a person on a certain PC running FreeBSD 5.3,
I want to call a "logout procedure" when the person logs out (either out of 
Gnome or
with a shutdown) as follow:

last -y -t ttyv0 | awk '{print $1,$4,$5,$6,$9}' | loginperiod >> 
/home/user/<name>/Test.log

where loginperiod is a tested Perl script which will give the required output.
However, the total logintime is written in /var/log/wtmp during the logout 
process. Just after
that moment, I want to call my script, using the command sequence above, and 
seperately log the time
in /home of the user (or like: <user>_Timesheet.log instead of Test.log).
I have tried to call this script in /etc/rc.shutdown, but it only creates 
Test.log as an empty
file (the command above will give an output like: <name> <date> <time today> 
<time this month> 
<total logins>).
Where, during the logout procedure, is /var/log/wtmp updated for the user time?
Where and how should I call the above command sequence in order to seperately 
log the logintime
for today using the last command??

Thank you in advance for any insights,
Eugene Zegers


-- 
___________________________________________________________
Sign-up for Ads Free at Mail.com
http://promo.mail.com/adsfreejump.htm

_______________________________________________
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"

Reply via email to