From 4a5fba6b37ebc66ea87d2d6f2856e3967a220c2f Mon Sep 17 00:00:00 2001 From: Evan Broder Date: Sun, 30 Mar 2008 06:36:27 -0400 Subject: [PATCH 1/1] sipb-xen-chrony-config applies the chrony.conf file that I've been using to make sure that the time stays synced up Add sipb-xen-chrony-config as a dependency on sipb-xen-console and also clean up the motd a bit so there's more space svn path=/trunk/packages/sipb-xen-chrony-config/; revision=353 --- debian/changelog | 5 ++ debian/compat | 1 + debian/control | 15 ++++++ debian/control.in | 15 ++++++ debian/copyright | 3 ++ debian/rules | 9 ++++ debian/sipb-xen-chrony-config.install | 1 + files/etc/chrony/chrony.conf.sipb-xen | 87 +++++++++++++++++++++++++++++++++ 8 files changed, 136 insertions(+) create mode 100644 debian/changelog create mode 100644 debian/compat create mode 100644 debian/control create mode 100644 debian/control.in create mode 100644 debian/copyright create mode 100755 debian/rules create mode 100644 debian/sipb-xen-chrony-config.install create mode 100644 files/etc/chrony/chrony.conf.sipb-xen diff --git a/debian/changelog b/debian/changelog new file mode 100644 index 0000000..f71e52b --- /dev/null +++ b/debian/changelog @@ -0,0 +1,5 @@ +sipb-xen-chrony-config (1) unstable; urgency=low + + * Initial release. + + -- SIPB Xen Project Sun, 30 Mar 2008 06:23:10 -0400 diff --git a/debian/compat b/debian/compat new file mode 100644 index 0000000..7ed6ff8 --- /dev/null +++ b/debian/compat @@ -0,0 +1 @@ +5 diff --git a/debian/control b/debian/control new file mode 100644 index 0000000..7cafc57 --- /dev/null +++ b/debian/control @@ -0,0 +1,15 @@ +Source: sipb-xen-chrony-config +Section: misc +Priority: important +Maintainer: sipb-xen@mit.edu +Build-Depends: cdbs (>= 0.4.23-1.1), debhelper (>= 5), config-package-dev +Standards-Version: 3.7.2 + +Package: sipb-xen-chrony-config +Architecture: all +Provides: ${diverted-files} +Conflicts: ${diverted-files} +Depends: ${shlibs:Depends}, ${misc:Depends}, chrony +Description: Chrony configuration package for sipb-xen VMs + This package should be installed on sipb-xen VMs to maintain + an accurate clock diff --git a/debian/control.in b/debian/control.in new file mode 100644 index 0000000..785622f --- /dev/null +++ b/debian/control.in @@ -0,0 +1,15 @@ +Source: sipb-xen-chrony-config +Section: misc +Priority: important +Maintainer: sipb-xen@mit.edu +Build-Depends: @cdbs@ +Standards-Version: 3.7.2 + +Package: sipb-xen-chrony-config +Architecture: all +Provides: ${diverted-files} +Conflicts: ${diverted-files} +Depends: ${shlibs:Depends}, ${misc:Depends}, chrony +Description: Chrony configuration package for sipb-xen VMs + This package should be installed on sipb-xen VMs to maintain + an accurate clock diff --git a/debian/copyright b/debian/copyright new file mode 100644 index 0000000..7789434 --- /dev/null +++ b/debian/copyright @@ -0,0 +1,3 @@ +This package was created for internal use of the SIPB Xen Project of +the MIT Student Information Processing Board. Ask sipb-xen@mit.edu if +you have questions about redistribution. diff --git a/debian/rules b/debian/rules new file mode 100755 index 0000000..f3cb522 --- /dev/null +++ b/debian/rules @@ -0,0 +1,9 @@ +#!/usr/bin/make -f + +DEB_AUTO_UPDATE_DEBIAN_CONTROL = 1 +DEB_DIVERT_EXTENSION = .sipb-xen +DEB_DIVERT_FILES_sipb-xen-chrony-config += \ + /etc/chrony.conf + +include /usr/share/cdbs/1/rules/debhelper.mk +include /usr/share/cdbs/1/rules/replace-files.mk diff --git a/debian/sipb-xen-chrony-config.install b/debian/sipb-xen-chrony-config.install new file mode 100644 index 0000000..9da31b3 --- /dev/null +++ b/debian/sipb-xen-chrony-config.install @@ -0,0 +1 @@ +files/* . diff --git a/files/etc/chrony/chrony.conf.sipb-xen b/files/etc/chrony/chrony.conf.sipb-xen new file mode 100644 index 0000000..d3b4bc2 --- /dev/null +++ b/files/etc/chrony/chrony.conf.sipb-xen @@ -0,0 +1,87 @@ +# This the default chrony.conf file for the Debian chrony package. It is +# suitable for a system with an intermittent dial-up connection. After +# editing this file use the command 'invoke-rc.d chrony restart' to make +# your changes take effect. +# John Hasler 3 Dec. 1998 + +# See www.pool.ntp.org for an explanation of these servers. Please +# consider joining the project if possible. If you can't or don't want to +# use these servers I suggest that you try your ISP's nameservers. We mark +# the servers 'offline' so that chronyd won't try to connect when the link +# is down. Scripts in /etc/ppp/ip-up.d and /etc/ppp/ip-down.d use chronyc +# commands to switch it on when the link comes up and off when it goes +# down. If you have an always-on connection such as cable omit the +# 'offline' directive and chronyd will default to online. + +server time.mit.edu +server tick.mit.edu + +# Look here for the admin password needed for chronyc. The initial +# password is generated by a random process at install time. You may +# change it if you wish. + +keyfile /etc/chrony/chrony.keys + +# Set runtime command key. Note that if you change the key (not the +# password) to anything other than 1 you will need to edit +# /etc/ppp/ip-up.d/chrony, /etc/ppp/ip-down.d/chrony, and +# /etc/cron.weekly/chrony as these scripts use it to get the password. + +commandkey 1 + +# I moved the driftfile to /var/lib/chrony to comply with the Debian +# filesystem standard. + +driftfile /var/lib/chrony/chrony.drift + +# Comment this line out to turn off logging. + +log tracking measurements statistics +logdir /var/log/chrony + +# Stop bad estimates upsetting machine clock. + +maxupdateskew 100.0 + +# Dump measurements when daemon exits. + +dumponexit + +# Specify directory for dumping measurements. + +dumpdir /var/lib/chrony + +# Let computer be a server when it is unsynchronised. + +local stratum 10 + +# Allow computers on the unrouted nets 10 and 192.168 to use the server. + +allow 10/8 +allow 192.168/16 +allow 172.16/12 + +# This directive forces `chronyd' to send a message to syslog if it +# makes a system clock adjustment larger than a threshold value in seconds. + +logchange 0.5 + +# This directive defines an email address to which mail should be sent +# if chronyd applies a correction exceeding a particular threshold to the +# system clock. + +# mailonchange root@localhost 0.5 + +# This directive tells chrony to regulate the real-time clock and tells it +# Where to store related data. It may not work on some newer motherboards +# that use the HPET real-time clock. It requires enhanced real-time +# support in the kernel. + +rtcfile /var/lib/chrony/chrony.rtc + +# If the last line of this file reads 'rtconutc' chrony will assume that +# the CMOS clock is on UTC (GMT). If it reads '# rtconutc' or is absent +# chrony will assume local time. The line (if any) was written by the +# chrony postinst based on what it found in /etc/default/rcS. You may +# change it if necessary. +rtconutc -- 1.7.9.5