You are not logged in.

#1 2009-06-08 12:27:48

Mountainjew
Member
From: Ireland
Registered: 2008-08-24
Posts: 405

Openntpd problems

Hi,

So since i reinstalled arch a few months back i've had constant problems with openntpd and ntpd. Sometimes they start ok, sometimes they just seem to sleep. I'm dualbooting with windows (which i barely use) so i'm using localtime. Here's my rc.conf

# /etc/rc.conf - Main Configuration for Arch Linux
#

# -----------------------------------------------------------------------
# LOCALIZATION
# -----------------------------------------------------------------------
#
# LOCALE: available languages can be listed with the 'locale -a' command
# HARDWARECLOCK: set to "UTC" or "localtime"
# USEDIRECTISA: use direct I/O requests instead of /dev/rtc for hwclock
# TIMEZONE: timezones are found in /usr/share/zoneinfo
# KEYMAP: keymaps are found in /usr/share/kbd/keymaps
# CONSOLEFONT: found in /usr/share/kbd/consolefonts (only needed for non-US)
# CONSOLEMAP: found in /usr/share/kbd/consoletrans
# USECOLOR: use ANSI color sequences in startup messages
#
LOCALE="en_US.utf8"
HARDWARECLOCK="localtime"
USEDIRECTISA="no"
TIMEZONE="Europe/London"
KEYMAP="uk"
CONSOLEFONT=
CONSOLEMAP=
USECOLOR="yes"

# -----------------------------------------------------------------------
# HARDWARE
# -----------------------------------------------------------------------
#
# MOD_AUTOLOAD: Allow autoloading of modules at boot and when needed
# MOD_BLACKLIST: Prevent udev from loading these modules
# MODULES: Modules to load at boot-up. Prefix with a ! to blacklist.
#
# NOTE: Use of 'MOD_BLACKLIST' is deprecated. Please use ! in the MODULES array.
#
MOD_AUTOLOAD="yes"
#MOD_BLACKLIST=() #deprecated
MODULES=(rt73usb !rt2570 !rt2x00lib !rt2500usb !snd_pcsp !pcspkr)

# Scan for LVM volume groups at startup, required if you use LVM
USELVM="no"

# -----------------------------------------------------------------------
# NETWORKING
# -----------------------------------------------------------------------
#
# HOSTNAME: Hostname of machine. Should also be put in /etc/hosts
#
HOSTNAME="archy"

# Use 'ifconfig -a' or 'ls /sys/class/net/' to see all available interfaces.
#
# Interfaces to start at boot-up (in this order)
# Declare each interface then list in INTERFACES
#   - prefix an entry in INTERFACES with a ! to disable it
#   - no hyphens in your interface names - Bash doesn't like it
# 
# DHCP:     Set your interface to "dhcp" (eth0="dhcp")
# Wireless: See network profiles below
#
#eth0="eth0 192.168.0.2 netmask 255.255.255.0 broadcast 192.168.0.255"
eth0="dhcp"
wlan0="dhcp"
INTERFACES=(!eth0 !wlan0)

# Routes to start at boot-up (in this order)
# Declare each route then list in ROUTES
#   - prefix an entry in ROUTES with a ! to disable it
#
gateway="default gw 192.168.0.1"
ROUTES=(!gateway)
 
# Enable these network profiles at boot-up.  These are only useful
# if you happen to need multiple network configurations (ie, laptop users)
#   - set to 'menu' to present a menu during boot-up (dialog package required)
#   - prefix an entry with a ! to disable it
#
# Network profiles are found in /etc/network.d
#
# This now requires the netcfg package
#
#NETWORKS=(main)

# -----------------------------------------------------------------------
# DAEMONS
# -----------------------------------------------------------------------
#
# Daemons to start at boot-up (in this order)
#   - prefix a daemon with a ! to disable it
#   - prefix a daemon with a @ to start it up in the background
#
DAEMONS=(syslog-ng hal wicd crond fam kdm openntpd)

When i check daemons.log, there are no messages from ntpd. And i assume since i'm using wicd to connect, that sometimes openntpd starts before the connection is up and running but seems to go to sleep since there's no connection. Is there a script or something so i can delay openntpd? It's driving me nuts. You'd think keeping the time synched would be easy sad

Offline

#2 2009-06-08 14:14:24

Trent
Member
From: Baltimore, MD (US)
Registered: 2009-04-16
Posts: 990

Re: Openntpd problems

Mountainjew wrote:

Is there a script or something so i can delay openntpd? It's driving me nuts. You'd think keeping the time synched would be easy sad

Sure.

#!/bin/sh
sleep 15s # or whatever time delay you choose
/etc/rc.d/openntpd $@

Stick that in /etc/rc.d and add it to your DAEMONS line (background it, obviously, to avoid putting the 15 second delay in your boot time).

My solution was to use net-auto for my connections so that my network is up before openntpd starts.

Offline

#3 2009-06-08 18:36:47

Mountainjew
Member
From: Ireland
Registered: 2008-08-24
Posts: 405

Re: Openntpd problems

I just edited the openntpd in rc.d and put sleep 20s and that seems to work. Is there any potential issues in doing it that way? I couldn't get your script to run for some reason.

Offline

Board footer

Powered by FluxBB