FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Ubuntu > Ubuntu User

 
 
LinkBack Thread Tools
 
Old 07-17-2011, 08:38 AM
Colin Law
 
Default Running ntpdate from cron.daily

In order to keep the SheevaPlug that controls my weather station time
synchronised I followed the instructions in [1] and created a file
etc/cron.daily/ntpdate containing
ntpdate ntp.ubuntu.com
and made it executable. This did not work and I realised that I
needed to start the file with
#! /bin/bash
and then it worked fine. Before I go and edit the wiki can someone
confirm that I have correctly analysed the problem.

Colin

[1] https://help.ubuntu.com/community/UbuntuTime#Command%20Line%20ntpdate

--
ubuntu-users mailing list
ubuntu-users@lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
 
Old 07-17-2011, 10:33 PM
Stephen Kuhn
 
Default Running ntpdate from cron.daily

On Sun, 2011-07-17 at 09:38 +0100, Colin Law wrote:
> In order to keep the SheevaPlug that controls my weather station time
> synchronised I followed the instructions in [1] and created a file
> etc/cron.daily/ntpdate containing
> ntpdate ntp.ubuntu.com
> and made it executable. This did not work and I realised that I
> needed to start the file with
> #! /bin/bash
> and then it worked fine. Before I go and edit the wiki can someone
> confirm that I have correctly analysed the problem.
>

You can set options for ntpdate in the /etc/default/ntpdate file, along
with the /etc/ntp.conf => this would allow you to not have a script at
all, and just modify the configurations directly from either of these
two files; so you'd not need a cron job. HTH.

--
yankdownunder
reg'd linux user #267497
--------------------------------------
Veni, Vidi, volo in domum redire.
--------------------------------------
I run linux, now go STFU.


--
ubuntu-users mailing list
ubuntu-users@lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
 
Old 07-18-2011, 06:20 AM
Colin Law
 
Default Running ntpdate from cron.daily

On 17 July 2011 23:33, Stephen Kuhn <yank.down.under@gmx.com> wrote:
> On Sun, 2011-07-17 at 09:38 +0100, Colin Law wrote:
>> In order to keep the SheevaPlug that controls my weather station time
>> synchronised I followed the instructions in [1] and created a file
>> etc/cron.daily/ntpdate containing
>> ntpdate ntp.ubuntu.com
>> and made it executable. *This did not work and I realised that I
>> needed to start the file with
>> #! /bin/bash
>> and then it worked fine. *Before I go and edit the wiki can someone
>> confirm that I have correctly analysed the problem.
>>
>
> You can set options for ntpdate in the /etc/default/ntpdate file, along
> with the /etc/ntp.conf => this would allow you to not have a script at
> all, and just modify the configurations directly from either of these
> two files; so you'd not need a cron job. HTH.

My question has nothing to do with the ntp daemon ntpd, which I think
is what you are referring to. The Plug PC only has 512MB ram and a
4GB SD. I do not wish the overheads of additional disk space, ram or
processor of installing and running ntpd. Synchronising the clock
daily using ntpdate is sufficient. My question is merely whether a
script in cron.daily should start with the #! shell line.

Colin

--
ubuntu-users mailing list
ubuntu-users@lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
 
Old 07-18-2011, 07:17 AM
Stephen Kuhn
 
Default Running ntpdate from cron.daily

On Mon, 2011-07-18 at 07:20 +0100, Colin Law wrote:

> My question has nothing to do with the ntp daemon ntpd, which I think
> is what you are referring to. The Plug PC only has 512MB ram and a
> 4GB SD. I do not wish the overheads of additional disk space, ram or
> processor of installing and running ntpd. Synchronising the clock
> daily using ntpdate is sufficient. My question is merely whether a
> script in cron.daily should start with the #! shell line.
>
> Colin

So sorry, Colin!
Yes, you start the script with:

#!/bin/bash

...and the a nice "exit" at the end generally...sorry mate!

--
yankdownunder
reg'd linux user #267497
--------------------------------------
Veni, Vidi, volo in domum redire.
--------------------------------------
I run linux, now go STFU.


--
ubuntu-users mailing list
ubuntu-users@lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
 
Old 07-18-2011, 08:16 AM
Colin Law
 
Default Running ntpdate from cron.daily

On 18 July 2011 08:17, Stephen Kuhn <yank.down.under@gmx.com> wrote:
> On Mon, 2011-07-18 at 07:20 +0100, Colin Law wrote:
>
>> My question has nothing to do with the ntp daemon ntpd, which I think
>> is what you are referring to. *The Plug PC only has 512MB ram and a
>> 4GB SD. *I do not wish the overheads of additional disk space, ram or
>> processor of installing and running ntpd. *Synchronising the clock
>> daily using ntpdate is sufficient. *My question is merely whether a
>> script in cron.daily should start with the #! shell line.
>>
>> Colin
>
> So sorry, Colin!
> Yes, you start the script with:
>
> #!/bin/bash
>
> ...and the a nice "exit" at the end generally...sorry mate!

OK, many thanks. I will go and update the wiki.
My reply was not meant to seem ungrateful, just clarifying my
question. I could have phrased my reply better.

Colin

--
ubuntu-users mailing list
ubuntu-users@lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
 

Thread Tools




All times are GMT. The time now is 04:32 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org