LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian
User Name
Password
Debian This forum is for the discussion of Debian Linux.

Notices


Reply
  Search this Thread
Old 08-13-2006, 05:30 PM   #1
cccc
Senior Member
 
Registered: Sep 2003
Distribution: Debian Squeeze / Wheezy
Posts: 1,623

Rep: Reputation: 51
howto start ntpdate after restart ?


hi

on my debian sarge stable I have in cron.hourly the following entry:
Code:
debian:~# cat /etc/cron.hourly/ntpdate
#!/bin/sh

/usr/sbin/ntpdate -v 130.133.1.10 131.188.3.220 193.67.79.202 ; /sbin/hwclock --systohc > /dev/null 2>&1
because I'll synchronize the system time every hour,

but the machine has a wirelless card with wpa encryption and the cron will start before the internet connection, so the system is hanging each time during the restart.

could someone help me pls to solve this problem ?

Last edited by cccc; 08-13-2006 at 05:34 PM.
 
Old 08-13-2006, 06:16 PM   #2
rickh
Senior Member
 
Registered: May 2004
Location: Albuquerque, NM USA
Distribution: Debian-Lenny/Sid 32/64 Desktop: Generic AMD64-EVGA 680i Laptop: Generic Intel SIS-AC97
Posts: 4,250

Rep: Reputation: 62
ntpdate does that by itself. You don't need a cron job. At least mine does.
 
Old 08-13-2006, 06:33 PM   #3
cccc
Senior Member
 
Registered: Sep 2003
Distribution: Debian Squeeze / Wheezy
Posts: 1,623

Original Poster
Rep: Reputation: 51
Quote:
Originally Posted by rickh
ntpdate does that by itself. You don't need a cron job. At least mine does.
Code:
debian:~# ntpdate
14 Aug 01:30:04 ntpdate[4389]: no servers can be used, exiting
could you post pls your /etc/ntp.conf ?

my /etc/ntp.conf is empty.

I've installed ntp, but my /etc/ntp.conf is still empty.

and howto be sure, that ntpdate runs automatically ?

Last edited by cccc; 08-13-2006 at 06:47 PM.
 
Old 08-13-2006, 06:48 PM   #4
rickh
Senior Member
 
Registered: May 2004
Location: Albuquerque, NM USA
Distribution: Debian-Lenny/Sid 32/64 Desktop: Generic AMD64-EVGA 680i Laptop: Generic Intel SIS-AC97
Posts: 4,250

Rep: Reputation: 62
Here's an easier solution "apt-get install ntp-simple"

It'll set up the daemon and write your /etc/ntp.conf file
 
Old 08-13-2006, 06:57 PM   #5
cccc
Senior Member
 
Registered: Sep 2003
Distribution: Debian Squeeze / Wheezy
Posts: 1,623

Original Poster
Rep: Reputation: 51
thanks, but is it any other solution tu use ntpdate instead of ntp daemon ?
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
how can i start, stop or restart Paxmaster Slackware 3 11-27-2004 01:31 PM
HOWTo restart downloading with wget ashwin_cse Red Hat 5 08-26-2004 10:07 AM
how to stop/start/restart iptables? plan9 Linux - Newbie 8 08-06-2004 04:40 PM
Synaptic will not start after restart! Oh Cisco Debian 8 07-29-2004 11:44 AM
Samba - Start or Restart? Charlie Spencer Linux - Networking 5 11-22-2003 10:39 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian

All times are GMT -5. The time now is 10:46 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration