From: rpe Date: Sun, 13 Jul 2014 13:53:36 +0000 (+0000) Subject: - move the ntpd.conf file to examples directory X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=285a77de1a26b4b95f91f3135928406aa48a1d5c;p=openbsd - move the ntpd.conf file to examples directory - move it from BIN1 to EXAMPLES in src/etc/Makefile - change the installer to create the file instead of editing it - add a '+' to the corresponding changelist entry suggested by and OK deraadt@ OK for the installer change krw@ --- diff --git a/distrib/miniroot/install.sub b/distrib/miniroot/install.sub index c90664631ab..27935f14da1 100644 --- a/distrib/miniroot/install.sub +++ b/distrib/miniroot/install.sub @@ -1,4 +1,4 @@ -# $OpenBSD: install.sub,v 1.778 2014/07/12 15:27:15 rpe Exp $ +# $OpenBSD: install.sub,v 1.779 2014/07/13 13:53:36 rpe Exp $ # # Copyright (c) 1997-2009 Todd Miller, Theo de Raadt, Ken Westerback # All rights reserved. @@ -1809,16 +1809,9 @@ apply() if [[ $ntpd == y ]]; then echo "ntpd_flags= # enabled during install" \ >>/mnt/etc/rc.conf.local - if [[ $ntpd_server != default ]]; then - # Comment out the default 'servers' line, and add a - # 'servers' line with the first token in $resp as the - # server. - set -- $ntpd_server - sed "s/^servers /#&/;/#server /a\\ -servers $1 -" /mnt/etc/ntpd.conf >/tmp/ntpd.conf - cp /tmp/ntpd.conf /mnt/etc/ntpd.conf - fi + [[ $ntpd_server == default ]] && ntpd_server=pool.ntp.org + echo "# created during install\nservers ${ntpd_server%% *}" \ + >/mnt/etc/ntpd.conf fi if [[ $x11 == y ]]; then diff --git a/etc/Makefile b/etc/Makefile index 47c212027d2..2b070cc78d9 100644 --- a/etc/Makefile +++ b/etc/Makefile @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile,v 1.369 2014/07/13 13:01:48 ajacoutot Exp $ +# $OpenBSD: Makefile,v 1.370 2014/07/13 13:53:36 rpe Exp $ TZDIR= /usr/share/zoneinfo LOCALTIME= Canada/Mountain @@ -36,10 +36,11 @@ BIN1= changelist csh.cshrc csh.login csh.logout daily \ newsyslog.conf protocols rc rc.conf rc.local \ rc.securelevel rc.shutdown rpc services shells syslog.conf \ weekly etc.${MACHINE}/login.conf etc.${MACHINE}/disktab \ - dhclient.conf mailer.conf ntpd.conf moduli pf.os mixerctl.conf + dhclient.conf mailer.conf moduli pf.os mixerctl.conf EXAMPLES=chio.conf dhcpd.conf exports ftpchroot hosts.lpd ifstated.conf \ - inetd.conf mrouted.conf printcap rbootd.conf remote sensorsd.conf + inetd.conf mrouted.conf ntpd.conf printcap rbootd.conf remote \ + sensorsd.conf EXAMPLES_600=bgpd.conf dvmrpd.conf hostapd.conf iked.conf ipsec.conf \ ldapd.conf ldpd.conf ospf6d.conf ospfd.conf relayd.conf ripd.conf \ diff --git a/etc/changelist b/etc/changelist index 3debfe05782..d6b7afd6db9 100644 --- a/etc/changelist +++ b/etc/changelist @@ -1,4 +1,4 @@ -# $OpenBSD: changelist,v 1.91 2014/07/12 03:52:39 deraadt Exp $ +# $OpenBSD: changelist,v 1.92 2014/07/13 13:53:36 rpe Exp $ # # List of files which the security script backs up and checks # for modifications. @@ -94,7 +94,7 @@ /etc/nginx/nginx.conf /etc/npppd/npppd.conf +/etc/npppd/npppd-users -/etc/ntpd.conf ++/etc/ntpd.conf +/etc/ospf6d.conf +/etc/ospfd.conf /etc/passwd diff --git a/etc/examples/ntpd.conf b/etc/examples/ntpd.conf new file mode 100644 index 00000000000..7fcbbed08cd --- /dev/null +++ b/etc/examples/ntpd.conf @@ -0,0 +1,18 @@ +# $OpenBSD: ntpd.conf,v 1.1 2014/07/13 13:53:36 rpe Exp $ +# sample ntpd configuration file, see ntpd.conf(5) + +# Addresses to listen on (ntpd does not listen by default) +#listen on * + +# sync to a single server +#server ntp.example.org + +# use a random selection of NTP Pool Time Servers +# see http://support.ntp.org/bin/view/Servers/NTPPoolServers +servers pool.ntp.org + +# use a specific local timedelta sensor (radio clock, etc) +#sensor nmea0 + +# use all detected timedelta sensors +#sensor * diff --git a/etc/ntpd.conf b/etc/ntpd.conf deleted file mode 100644 index 275853c7fa9..00000000000 --- a/etc/ntpd.conf +++ /dev/null @@ -1,18 +0,0 @@ -# $OpenBSD: ntpd.conf,v 1.11 2009/05/18 16:13:48 stevesk Exp $ -# sample ntpd configuration file, see ntpd.conf(5) - -# Addresses to listen on (ntpd does not listen by default) -#listen on * - -# sync to a single server -#server ntp.example.org - -# use a random selection of NTP Pool Time Servers -# see http://support.ntp.org/bin/view/Servers/NTPPoolServers -servers pool.ntp.org - -# use a specific local timedelta sensor (radio clock, etc) -#sensor nmea0 - -# use all detected timedelta sensors -#sensor *