# Ntpdate and wireless



## shepper (May 13, 2011)

On FreeBSD 8.2/i386 running an openbox desktop I would like to synch my clock and attempted to use ntpdate but found in earlier posts that it is run in /etc/rc.d/ prior to wpa_supplicant.  I edited the /etc/rc.d/ntpdate file and added wpa_supplicant to the REQUIRE line as suggested.

```
#!/bin/sh
#
# $FreeBSD: src/etc/rc.d/ntpdate,v 1.16.10.2.4.1 2010/12/21 17:09:25 kensmith Exp $
#

# PROVIDE: ntpdate
# REQUIRE: NETWORKING syslogd named
# KEYWORD: nojail
```
I also tried removing the "#" from the REQUIRE line.  I am still getting the boot message that the time server was not found.  I can synch manually with

```
Musk# ntpdate us.pool.ntp.org
```
I also saw the suggestion to utilize the ntpd but do not really need to run a daemon for my desktop.
I can think of several places where I might be able to run the command:
    1) Arch linux uses rc.local
    2) .xsession
    3) OpenBox has an autostart.sh
Is any of the above options preferred over another?


----------



## DutchDaemon (May 13, 2011)

You can run it either from /etc/rc.local or from the root user's crontab with the *@reboot* time. Make sure to use full path names to the ntpdate (or any other) command. Both of these (rc.local / crontab) take effect after other rc scripts are run, so networking and DNS resolving should be up by that time.


----------

