On Thu, Jun 22, 2000 at 01:05:05AM +0200, Anthony E. Greene wrote:
> I have a small script that runs rdate and reports success or failure:
> 
> #!/bin/bash
> if rdate -s timeserver; then
>   echo Success
> else
>   echo Failure
> fi
> 
> 
> If the network connectivity is down between my box and the time server,
> rdate reports an error (as it should) but the script still reports
> success. What am I doing wrong?

I've hit this too, and best I can tell, rdate returns 0, no matter
what. I don't know if this is something that started with 6.2, or
before. What I am doing as a workaround:

 /usr/bin/rdate -s $SERVER_1 2> $TMP_FILE
     
    # tmp_file is workaround for no valid error code on failure...
    if [ -s $TMP_FILE ]; then

[...]



-- 
Hal B
[EMAIL PROTECTED]
--


-- 
To unsubscribe: mail [EMAIL PROTECTED] with "unsubscribe"
as the Subject.

Reply via email to