Just copy the following to a script:
_________________________________________________
#!/bin/bash
case $1 in
'login')
rconnect <username> <password>
if [ $? -ne 0 ]
then
date >> /var/log/reliance.log
fi;;
'logout')
rdisconnect
if [ $? -ne 0 ]
then
date >> /var/log/reliance.log
fi;;
esac
_________________________________________________
That must help... Provided rconnect and rdisconnect return 0.
To check this:
$ rconnect <uname> <passwd>
On successful login:
$ echo $?
Use the value printed here in the place of 0 in the script.
Cheers,
Karthick S.
Mobile Number: 9884025911
Home Page: www.geocities.com/sksatyam
(c)-----Original Message-----
(c)From: thiaguwin@xxxxxxxxxxxxx [mailto:thiaguwin@xxxxxxxxxxxxx]
(c)Sent: Monday, September 27, 2004 14:32
(c)To: Karthick Sundararajan; ilugc@xxxxxxxxxxxxx
(c)Subject: Re: [Ilugc] duration of connection
(c)
(c)
(c)Dear Mr. Karthick
(c)Thank you for your prompt reply
(c)
(c)but i do not know how to write a script
(c)
(c)would you please help to write a script ?
(c)have a wonderful day
(c)thiagu
Confidentiality Notice
The information contained in this electronic message and any attachments to
this message are intended
for the exclusive use of the addressee(s) and may contain confidential or
privileged information. If
you are not the intended recipient, please notify the sender at Wipro or
Mailadmin@xxxxxxxxx immediately
and destroy all copies of this message and any attachments.