[CLUE-Tech] Synching time shell script, where to put it to autosynch?

Lynn Danielson lynnd at techangle.com
Mon Feb 11 11:42:53 MST 2002


Kevin Cullis wrote:
> 
> if netdate -v tcp time.nist.gov; then
>    hwclock -w
> fi

'Not an answer to your question, but thought you
might be interested in knowing that the above
script can alternatively be written with a boolean
operator:

  netdate -v tcp time.nist.gov && hwclock -w

I'm not sure this construct is any more efficient
than an if statement.  It's arguably less readable.
But it's a common construct in start up scripts 
and more concise as a crontab entry.

Fwiw,

Lynn

Received: from tummy.com (IDENT:qmailr at secure.tummy.com [198.49.126.3])
	by clue.denver.co.us (8.9.3/8.9.3) with SMTP id XAA08573
	for <clue-tech at clue.denver.co.us>; Sun, 10 Feb 2002 23:27:15 -0700
Received: (qmail 17364 invoked by uid 10); 11 Feb 2002 06:32:03 -0000
Received: (qmail 1650 invoked by uid 500); 11 Feb 2002 06:32:00 -0000
Date: Sun, 10 Feb 2002 23:32:00 -0700
From: Sean Reifschneider <jafo at tummy.com>
To: clue-tech at clue.denver.co.us
Subject: Re: [CLUE-Tech] Synching time shell script, where to put it to autosynch?
Message-ID: <20020210233159.C1159 at tummy.com>
References: <3C66025E.9BA4A22 at orci.com> <200202101616.g1AGGh2v095115 at deimos.frii.net> <3C66A869.AD6F54A8 at orci.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
User-Agent: Mutt/1.2.5.1i
In-Reply-To: <3C66A869.AD6F54A8 at orci.com>; from kevincu at orci.com on Sun, Feb 10, 2002 at 10:05:45AM -0700
Sender: clue-tech-admin at clue.denver.co.us
Errors-To: clue-tech-admin at clue.denver.co.us
X-BeenThere: clue-tech at clue.denver.co.us
X-Mailman-Version: 2.0beta2
Precedence: bulk
Reply-To: clue-tech at clue.denver.co.us
List-Id: CLUE technical discussions, questions and answers. <clue-tech.clue.denver.co.us>

On Sun, Feb 10, 2002 at 10:05:45AM -0700, Kevin Cullis wrote:
>run it manually.  A friend suggested putting it in my home directory and
>then linking it to cron.daily or ip-up scripts.  I don't know enough to

Since cron.daily and ip-up run as root, that's a good way of allowing
somone who gains access to your account to jump to the root account...
Just food for thought...

Sean
-- 
 I hear a cow jack-knifed on the Harley Memorial Bridge...  There was milk
 everywhere.  -- Stephanie, _Newhart_
Sean Reifschneider, Inimitably Superfluous <jafo at tummy.com>
tummy.com - Linux Consulting since 1995. Qmail, KRUD, Firewalls, Python



More information about the clue-tech mailing list