On Tue, Jan 02, 2001 at 09:40:48PM -0500, Anthony E . Greene wrote:
> >
> >Just throwing some obvious errors at it, it does return 1 in limiting
> >testing. FWIW.
>
> That blurb is in the version that shipped with RH6.2 and I have not found an
> error condition that results in a nonzero exit code. How did you do it?
Just some IPs that were not good or didn't have a time server:
[root@feenix /tmp]# rdate -p 192.168.10.22
rdate: couldn't connect to host 192.168.10.22: No route to host
[root@feenix /tmp]# echo $?
1
[root@feenix /tmp]# rdate -p 192.168.10.15
rdate: couldn't connect to host 192.168.10.15: Connection refused
[root@feenix /tmp]# echo $?
1
[root@feenix /tmp]# rdate -p 156.46.204.6
rdate: couldn't connect to host 156.46.204.6: Connection timed out
[root@feenix /tmp]# echo $?
1
[root@feenix /tmp]# rdate -p gilbreth.ecn.purdue.edu
[gilbreth.ecn.purdue.edu] Tue Jan 2 22:05:30 2001
[root@feenix /tmp]# echo $?
0
I can't think of a way to simulate a real world time server failure.
But my script for rdate has code very similar to yours, for the same
reasons.
--
Hal B
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
--
_______________________________________________
Redhat-list mailing list
[EMAIL PROTECTED]
https://listman.redhat.com/mailman/listinfo/redhat-list