From dcf8589240782788ffc3d2b85069379201f4d90a Mon Sep 17 00:00:00 2001 From: Joerg Sonnenberger Date: Fri, 12 Nov 2004 19:45:36 +0000 Subject: [PATCH] Switch to OpenNTPD by default. For the moment, the documentation is not in-sync, -S [Do not set the time immediately], because when a default route exists, but DNS traffic is lost, the startup time is *big*. You can change this by overriding ntpd_flags in /etc/rc.conf. --- UPDATING | 6 +++++- etc/defaults/rc.conf | 7 ++----- etc/rc.d/ntpd | 31 ++-------------------------- etc/rc.d/ntpdate | 49 -------------------------------------------- usr.sbin/Makefile | 4 ++-- 5 files changed, 11 insertions(+), 86 deletions(-) delete mode 100644 etc/rc.d/ntpdate diff --git a/UPDATING b/UPDATING index 1851293535..154ab44724 100644 --- a/UPDATING +++ b/UPDATING @@ -1,4 +1,4 @@ -$DragonFly: src/UPDATING,v 1.8 2004/10/27 02:51:41 dillon Exp $ +$DragonFly: src/UPDATING,v 1.9 2004/11/12 19:45:36 joerg Exp $ Updating Information for DragonFly users. @@ -17,12 +17,16 @@ The following users may be missing from your password file. Use vipw and add any that are missing: smmsp:*:25:25::0:0:Sendmail Submission User:/var/spool/clientmqueue:/sbin/nologin +_pflogd:*:64:64::0:0:pflogd privsep user:/var/empty:/sbin/nologin +_ntp:*:65:65::0:0:ntpd privsep user:/var/empty:/sbin/nologin The following groups may be missing from your group file. Use vi /etc/group and add any that are missing: smmsp:*:25: authpf:*:63: +_pflogd:*:64: +_ntp:*:65: > Upgrading to DragonFly from FreeBSD diff --git a/etc/defaults/rc.conf b/etc/defaults/rc.conf index 07798f38ab..3776583777 100644 --- a/etc/defaults/rc.conf +++ b/etc/defaults/rc.conf @@ -14,7 +14,7 @@ # All arguments must be in double or single quotes. # # $FreeBSD: src/etc/defaults/rc.conf,v 1.180 2003/06/26 09:50:50 smkelly Exp $ -# $DragonFly: src/etc/defaults/rc.conf,v 1.16 2004/10/22 20:26:11 dillon Exp $ +# $DragonFly: src/etc/defaults/rc.conf,v 1.17 2004/11/12 19:45:36 joerg Exp $ ############################################################## ### Important initial Boot-time options #################### @@ -208,12 +208,9 @@ keyserv_flags="" # Flags to keyserv (if enabled). ### Network Time Services options: ### timed_enable="NO" # Run the time daemon (or NO). timed_flags="" # Flags to timed (if enabled). -ntpdate_enable="NO" # Run ntpdate to sync time on boot (or NO). -ntpdate_program="/usr/sbin/ntpdate" # path to ntpdate, if you want a different one. -ntpdate_flags="-b" # Flags to ntpdate (if enabled). ntpd_enable="NO" # Run ntpd Network Time Protocol (or NO). ntpd_program="/usr/sbin/ntpd" # path to ntpd, if you want a different one. -ntpd_flags="-p /var/run/ntpd.pid" # Flags to ntpd (if enabled). +ntpd_flags="-S" # Flags to ntpd (if enabled). # Network Information Services (NIS) options: All need rpcbind_enable="YES" ### nis_client_enable="NO" # We're an NIS client (or NO). diff --git a/etc/rc.d/ntpd b/etc/rc.d/ntpd index 368e996ec3..1b611bc3fa 100644 --- a/etc/rc.d/ntpd +++ b/etc/rc.d/ntpd @@ -2,7 +2,7 @@ # # $NetBSD: ntpd,v 1.6 2002/03/22 04:33:59 thorpej Exp $ # $FreeBSD: src/etc/rc.d/ntpd,v 1.5 2002/10/12 10:31:31 schweikh Exp $ -# $DragonFly: src/etc/rc.d/Attic/ntpd,v 1.2 2004/01/27 00:42:45 rob Exp $ +# $DragonFly: src/etc/rc.d/Attic/ntpd,v 1.3 2004/11/12 19:45:36 joerg Exp $ # # PROVIDE: ntpd @@ -15,33 +15,6 @@ name=ntpd rcvar=`set_rcvar` command="/usr/sbin/${name}" -pidfile="/var/run/${name}.pid" -required_files="/etc/ntp.conf" -ntpd_precmd() -{ - if [ -z "$ntpd_chrootdir" ]; then - return 0; - fi - - # If running in a chroot cage, ensure that the appropriate files - # exist inside the cage, as well as helper symlinks into the cage - # from outside. - # - # As this is called after the is_running and required_dir checks - # are made in run_rc_command(), we can safely assume ${ntpd_chrootdir} - # exists and ntpd isn't running at this point (unless forcestart - # is used). - # - if [ ! -c "${ntpd_chrootdir}/dev/clockctl" ]; then - rm -f "${ntpd_chrootdir}/dev/clockctl" - ( cd /dev ; /bin/pax -rw -pe clockctl "${ntpd_chrootdir}/dev" ) - fi - ln -fs "${ntpd_chrootdir}/var/db/ntp.drift" /var/db/ntp.drift - - # Change run_rc_commands()'s internal copy of $ntpd_flags - # - rc_flags="-u ntpd:ntpd -i ${ntpd_chrootdir} $rc_flags" -} - +required_files="/etc/ntpd.conf" load_rc_config $name run_rc_command "$1" diff --git a/etc/rc.d/ntpdate b/etc/rc.d/ntpdate deleted file mode 100644 index fa8dadf515..0000000000 --- a/etc/rc.d/ntpdate +++ /dev/null @@ -1,49 +0,0 @@ -#!/bin/sh -# -# $NetBSD: ntpdate,v 1.8 2002/03/22 04:16:39 lukem Exp $ -# $FreeBSD: src/etc/rc.d/ntpdate,v 1.4 2002/10/12 10:31:31 schweikh Exp $ -# $DragonFly: src/etc/rc.d/Attic/ntpdate,v 1.2 2003/11/19 10:32:45 eirikn Exp $ -# - -# PROVIDE: ntpdate -# REQUIRE: NETWORKING syslogd -# KEYWORD: DragonFly FreeBSD NetBSD - -. /etc/rc.subr - -name="ntpdate" -rcvar=`set_rcvar` - -case ${OSTYPE} in -DragonFly) - command="/usr/sbin/${name}" - command_args=">/dev/null 2>&1" - pidfile="/var/run/${name}.pid" - ;; -FreeBSD) - command="/usr/sbin/${name}" - command_args=">/dev/null 2>&1" - pidfile="/var/run/${name}.pid" - ;; -NetBSD) - start_cmd="ntpdate_start" - stop_cmd=":" - ;; -esac - -ntpdate_start() -{ - if [ -z "$ntpdate_hosts" ]; then - ntpdate_hosts=`awk ' - /^server[ \t]*127.127/ {next} - /^(server|peer)/ {print $2} - '