--- dphys-config-20100216.orig/debian/cron.d
+++ dphys-config-20100216/debian/cron.d
@@ -0,0 +1,13 @@
+# /etc/cron.d/dphys-config - nightly trigger automatic config updates
+# authors dsbg and franklin, last modification 2006.09.15
+# copyright ETH Zuerich Physics Departement
+#   use under either modified/non-advertising BSD or GPL license
+
+SHELL=/bin/sh
+PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
+
+# daily early morning autoupgrade of config files of our systems
+#   after 03:00, when users are assumed to be least active
+#   before 04:00 so that finished long before dphys-admin starts
+#     by 1 hour, because random sleep 0..59min to spread load on pkg server
+0 3 * * *	root	[ -f /etc/dphys-config -a -x /usr/bin/dphys-config ] && /usr/bin/dphys-config cron > /dev/null 2>&1
--- dphys-config-20100216.orig/debian/docs
+++ dphys-config-20100216/debian/docs
@@ -0,0 +1,2 @@
+FAQ
+README
--- dphys-config-20100216.orig/debian/copyright
+++ dphys-config-20100216/debian/copyright
@@ -0,0 +1,71 @@
+This package was debianized by Gürkan Sengün <gurkan@linuks.mine.nu> on
+Fri, 15 Sep 2006 16:37:40 +0200.
+
+It was downloaded from http://neil.franklin.ch/Projects/dphys-config/
+
+Upstream Author: Neil Franklin <neil@franklin.ch>
+
+This software is dual-licensed under the GNU General Public License (GPL),
+and the modified/non-advertising BSD License (BSD).
+
+License (Public Domain, findcdroms.c):
+
+   Download from http://stian.lunafish.org/coding-cdrom.php
+   Written by Stian Sebastian Skjelstad <stian@nixia.no>
+
+License (Public Domain, examples written by Gürkan Sengün):
+
+   Download from http://debian.ethz.ch/pub/debian-local/share/kernel/
+
+License (GPL):
+
+   Copyright © 2005-2006 Neil Franklin
+
+   This package is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 2 of the License, or
+   (at your option) any later version.
+
+   This package is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this package; if not, write to the Free Software
+   Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301 USA
+
+On Debian GNU/Linux systems, the complete text of the GNU General
+Public License can be found in `/usr/share/common-licenses/GPL'.
+
+License (BSD):
+
+   Copyright © 2005-2006 Neil Franklin
+
+   Redistribution and use in source and binary forms, with or without
+   modification, are permitted provided that the following conditions
+   are met:
+   1. Redistributions of source code must retain the above copyright
+      notice, this list of conditions and the following disclaimer.
+   2. Redistributions in binary form must reproduce the above copyright
+      notice, this list of conditions and the following disclaimer in the
+      documentation and/or other materials provided with the distribution.
+   3. Neither the name of the University nor the names of its contributors
+      may be used to endorse or promote products derived from this software
+      without specific prior written permission.
+
+   THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+   ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+   IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+   ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+   FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+   DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+   OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+   HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+   LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+   OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+   SUCH DAMAGE.
+
+The Debian packaging is © 2006, Gürkan Sengün <gurkan@linuks.mine.nu>,
+© 2009 Axel Beckert <abe@deuxchevaux.org> and is licensed under the
+GPL, see `/usr/share/common-licenses/GPL'.
--- dphys-config-20100216.orig/debian/dirs
+++ dphys-config-20100216/debian/dirs
@@ -0,0 +1,2 @@
+etc
+usr/bin
--- dphys-config-20100216.orig/debian/README.Debian
+++ dphys-config-20100216/debian/README.Debian
@@ -0,0 +1,10 @@
+dphys-config for Debian
+-----------------------
+
+This software is used for a lot of Debian GNU/Linux "stable" Workstations
+at http://www.debian.org/users/edu/ethz_phys
+
+Feel free to contact me with your own dphys-config examples that might
+be useful to others.
+
+ -- Gürkan Sengün <gurkan@linuks.mine.nu>, Fri, 15 Sep 2006 16:37:40 +0200
--- dphys-config-20100216.orig/debian/rules
+++ dphys-config-20100216/debian/rules
@@ -0,0 +1,52 @@
+#!/usr/bin/make -f
+# Uncomment this to turn on verbose mode.
+#export DH_VERBOSE=1
+
+DESTDIR=$(CURDIR)/debian/dphys-config
+
+build: build-stamp
+
+build-stamp:
+	dh_testdir
+	$(MAKE)
+	touch $@
+
+clean:
+	dh_testdir
+	dh_testroot
+	rm -f build-stamp
+	$(MAKE) clean
+	dh_clean 
+
+install: build
+	dh_testdir
+	dh_testroot
+	dh_prep
+	dh_installdirs
+	$(MAKE) install DESTDIR=$(DESTDIR)
+	# Install example config file as default config file
+	mkdir -pv $(CURDIR)/debian/dphys-config/etc/
+	cp -av dphys-config.example $(DESTDIR)/etc/dphys-config
+
+# Build architecture-independent files here.
+binary-indep: build install
+	dh_testdir
+	dh_testroot
+	dh_installchangelogs 
+	dh_installdocs
+	dh_installinit -- defaults 21
+	dh_installcron
+	dh_lintian
+	dh_compress
+	dh_fixperms
+	dh_installdeb
+	dh_gencontrol
+	dh_md5sums
+	dh_builddeb
+
+# Build architecture-dependent files here.
+binary-arch: build install
+# We have nothing to do by default.
+
+binary: binary-indep binary-arch
+.PHONY: build clean binary-indep binary-arch binary install
--- dphys-config-20100216.orig/debian/default
+++ dphys-config-20100216/debian/default
@@ -0,0 +1,8 @@
+# Defaults for dphys-config initscript, sourced by /etc/init.d/dphys-config
+#
+# This is a POSIX shell fragment
+#
+
+# By default, the init.d script won't start dphys-config inside a
+# chrooted environment. Change this to "yes" to change this behaviour.
+START_INSIDE_CHROOT="no"
--- dphys-config-20100216.orig/debian/changelog
+++ dphys-config-20100216/debian/changelog
@@ -0,0 +1,93 @@
+dphys-config (20100216-1) unstable; urgency=low
+
+  * New upstream release
+    - Works even with LANG not set to C or en_*
+    - New debug option LEAVE_WGET_OUTPUT
+    - Fixes some misspellings reported by Lintian 2.3.x
+    - Other not so common spellings won't be fixed by upstream, so let's
+      keep lintian quiet about them by using lintian overrides as
+      suggested on the lintian mailing list.
+  * Fix Lintian warning debhelper-but-no-misc-depends by adding
+    ${misc:Depends} to the dependencies.
+  * Bumped Standards-Version to 3.8.4 (no changes)
+  * Changed the maintainer e-mail address to my debian.org address.
+  * [debian/init.d] Add dependency to $remote_fs due to usage of /usr.
+
+ -- Axel Beckert <abe@debian.org>  Tue, 16 Feb 2010 21:46:39 +0100
+
+dphys-config (20090926-1) unstable; urgency=low
+
+  * New upstream release
+    - Now works with every web server (e.g. also ACME micro_httpd)
+    - Now handles blanks and backslashes correctly while preprocessing
+      and reading its own configuration file. (Closes: #510910)
+    - Supports file:/// URLs for configuration file locations
+    - Supports configurable temporary directory (defaults to /var/tmp)
+    - Supports mktemp by default if available (also obsoletes mktemp fix
+      from last NMU)
+    - New option -c to override hostname in chrooted environments
+    - Removed bashism fixes from last NMU since they have been intergrated
+      by upstream even though Debian doesn't require them anymore since
+      policy 3.8.1.
+    - Some more bashisms fixed in example scripts plus some bashisms in
+      dphys-config which checkbashism didn't find. (Closes: #530072)
+    - Upstream updated man page to fix a bunch of lintian warnings.
+    - Now throws error if ran unconfigured -> init.d script now also
+      checks the existence of the mandatory CONF_BASEURL setting
+  * New maintainer
+  * Updated e-mail addresses and URLs of upstream website in
+    debian/control and debian/copyright
+  * Added Vcs-* headers.
+  * Bumped Standards-Version to 3.8.3
+    - Changed all "(C)" to "©" in debian/copyright.
+  * Changed dh_clean -k to dh_prep in debian/rules.
+    - Bumped debhelper compatibility to 7.
+  * Install upstream dphys-config.example as default /etc/dphys-config
+    conffile.
+  * Added a watch file.
+  * Fixed lintian warnings:
+    - debian-rules-ignores-make-clean-error
+    - using-first-person-in-description
+  * Define $(DESTDIR) in debian/rules for better readability
+  * Changed behaviour of init.d script and cronjob:
+    - init.d: Don't start automatically inside a chrooted
+      environment. chrooted() test taken from udev.postinst.
+    - init.d, cron.d: Don't start automatically if no config file has been
+      created by the admin (prevents startup error messages if only
+      installed for personal use of users).
+  * Downgraded Recommends on pciutils to a Suggests.
+  * Removed Recommends on tcc. (An example script often needed on Sarge
+    needed tcc.)
+  * init.d script and cronjob now do nothing if dphys-config has been
+    removed but not purged. (Thanks to Myon for that hint!)
+
+ -- Axel Beckert <abe@deuxchevaux.org>  Sun, 11 Oct 2009 15:23:32 +0200
+
+dphys-config (20061020-2.1) unstable; urgency=medium
+
+  * Non-maintainer upload.
+  * bashism in 'dphys-config' script (Closes: #469084)
+  * debian/control:
+    - Bump Standards-Version to 3.7.3.
+    - Use Homepage: field for upstream URL.
+
+ -- Chris Lamb <chris@chris-lamb.co.uk>  Sat, 12 Apr 2008 04:33:12 +0100
+
+dphys-config (20061020-2) unstable; urgency=low
+
+  * Set start script priority to 21.
+
+ -- Gürkan Sengün <gurkan@linuks.mine.nu>  Wed, 31 Jan 2007 13:32:27 +0100
+
+dphys-config (20061020-1) unstable; urgency=low
+
+  * New upstream version.
+  * Added a few more examples.
+
+ -- Gürkan Sengün <gurkan@linuks.mine.nu>  Thu, 26 Oct 2006 09:19:39 +0200
+
+dphys-config (20060915-1) unstable; urgency=low
+
+  * Initial release (Closes: #387633)
+
+ -- Gürkan Sengün <gurkan@linuks.mine.nu>  Fri, 15 Sep 2006 16:37:40 +0200
--- dphys-config-20100216.orig/debian/control
+++ dphys-config-20100216/debian/control
@@ -0,0 +1,22 @@
+Source: dphys-config
+Section: admin
+Priority: optional
+Maintainer: Axel Beckert <abe@debian.org>
+Build-Depends: debhelper (>= 7)
+Standards-Version: 3.8.4
+Homepage: http://neil.franklin.ch/Projects/dphys-config/
+Vcs-Browser: http://git.phys.ethz.ch/?p=dphys-config-debian.git
+Vcs-Git: http://git.phys.ethz.ch/git/dphys-config-debian.git
+
+Package: dphys-config
+Architecture: all
+Depends: wget, ${misc:Depends}
+Suggests: pciutils
+Description: Tool to distribute config files
+ This project is aimed at automatically installing (and keeping
+ update) site specific config files on many hosts, after preprocessing
+ them (conditional content and include files and include sections). It
+ also triggers postinstall scripts whenever their associated config
+ file has been changed. It can also remove config files, including
+ running an preremove script before doing so. All this is driven by an
+ simple config file list.
--- dphys-config-20100216.orig/debian/watch
+++ dphys-config-20100216/debian/watch
@@ -0,0 +1,2 @@
+version=3
+http://neil.franklin.ch/Projects/dphys-config/ ../dphys-config-(\d{8}.*)\.tar\.gz
--- dphys-config-20100216.orig/debian/compat
+++ dphys-config-20100216/debian/compat
@@ -0,0 +1 @@
+7
--- dphys-config-20100216.orig/debian/dphys-config.lintian-overrides
+++ dphys-config-20100216/debian/dphys-config.lintian-overrides
@@ -0,0 +1,3 @@
+# According to the upstream author, "authenti*fi*cation" is commonly
+# used English and therefore English, even if it's not in the OED.
+dphys-config binary: spelling-error-in-manpage usr/share/man/man1/dphys-config.1.gz authentification authentication
--- dphys-config-20100216.orig/debian/NEWS
+++ dphys-config-20100216/debian/NEWS
@@ -0,0 +1,28 @@
+dphys-config (20090926-1) unstable; urgency=low
+
+  The behaviour of dphys-config's init.d script and cronjob have been modified:
+
+  * The init.d script does no more start dphys-config automatically inside
+    a chrooted environment, because while the hostname in a chroot doesn't
+    change, the configuration files you usually want, are different ones.
+
+    This new behaviour make it possible to install the dphys-config
+    package with debootstrap or xen-create-image from the xen-tools
+    package in automatic installation setups without having to clean up
+    the wrong config files from the newly created host.
+
+    You can get back the old behaviour (don't check for chroots) by
+    setting START_INSIDE_CHROOT="yes" in /etc/default/dphys-config.
+
+  * Neither the init.d script nor the default cronjob start dphys-config
+    automatically if no configuration file has been provided since the
+    default values are set in a way that they can't work and the admin has
+    to change them.
+
+    This new behaviour prevents startup error messages if dphys-config has
+    only been installed for the personal use of users, but not for the
+    maintaining the configuration of the host on which it is being
+    installed.
+
+ -- Axel Beckert <abe@deuxchevaux.org>  Wed, 03 Jun 2009 20:16:06 +0200
+
--- dphys-config-20100216.orig/debian/init.d
+++ dphys-config-20100216/debian/init.d
@@ -0,0 +1,118 @@
+#!/bin/sh
+# /etc/init.d/dphys-config - boot time trigger automatic config updates
+# authors dsbg, franklin and abe, last modification 2009.06.08
+# Copyright ETH Zurich Physics Department
+#   use under either modified/non-advertising BSD or GPL license
+
+# this init.d script is intended to be run from rc2.d
+#   on our site it needs to run after rc2.d/S20inetd (and so identd)
+#     else our config file server will disallow requests for config files
+#   on our site it needs to run before rc2.d/S24dphys-admin
+#     else that will not find its /etc/dphys-admin.list config file
+#   so we run it as rc2.d/S22dphys-config
+
+### BEGIN INIT INFO
+# Provides:          dphys-config
+# Required-Start:    $syslog $remote_fs
+# Required-Stop:     $syslog $remote_fs
+# Should-Start:      $local_fs
+# Should-Stop:       $local_fs
+# Default-Start:     2 3 4 5
+# Default-Stop:      
+# Short-Description: Fetch and merge config files, run scripts when they change
+# Description:       Tool to get a list of config files, and for each file
+#                    in that list retrieve it from same server and install
+#                    it if not yet there.
+### END INIT INFO
+
+PATH=/sbin:/bin:/usr/sbin:/usr/bin
+export PATH
+
+# what we are
+NAME=dphys-config
+CONFIG=/etc/${NAME}
+DEFAULT=/etc/default/${NAME}
+BIN=/usr/bin/${NAME}
+
+# exit if dphys-config is not installed (i.e. removed but not purged)
+[ -x ${BIN} ] || exit 0
+
+# init.d config settings
+if [ -f ${DEFAULT} ]; then
+  . ${DEFAULT}
+fi
+
+# dphys-config config settings
+CONF_BASEURL=''
+if [ -f ${CONFIG} ]; then
+  . ${CONFIG}
+fi
+
+chrooted() {
+  if [ "${START_INSIDE_CHROOT}" != "yes" ]; then
+      if [ -d /proc/1 ]; then
+	  if [ `id -u` = 0 ]; then
+	      if [ "$(stat -c %d/%i /)" = "$(stat -Lc %d/%i /proc/1/root 2>/dev/null)" ]; then
+		  # the devicenumber/inode pair of / is the same as
+		  # that of /sbin/init's root, so we're *not* in a
+		  # chroot and hence return false
+		  return 1
+	      else
+		  return 0
+	      fi
+	  else
+	      echo "$0: chroot test doesn't work as normal user." >&2;
+	      exit 3;
+	  fi
+      else
+	  echo "$0: WARNING: /proc not mounted, assuming chrooted environment." >&2;
+	  return 1;
+      fi
+  fi
+  return 0
+}
+
+case "$1" in
+
+  start)
+    # Don't start inside a chroot.
+    if ! chrooted; then
+	# Don't start if we don't know where to fetch config updates
+	if [ -f ${CONFIG} ]; then
+	    if [ -n "${CONF_BASEURL}" ]; then
+		/bin/echo "Starting ${NAME} automatic config updates ..."
+
+		# In case system was switched off for a while, run an
+		# upgrade.  This will produce output, so no -n in above
+		# echo.
+		${BIN} init
+	    else
+		/bin/echo "No CONF_BASEURL setting found. ${NAME} not updating configs ..."
+	    fi
+	else
+	    /bin/echo "/etc/${NAME} not found. ${NAME} not updating configs ..."
+	fi
+    else
+	/bin/echo "Running inside a chrooted environment. ${NAME} not updating configs ..."
+    fi
+
+    /bin/echo "done."
+    ;;
+
+  stop|default-stop)
+    /bin/echo "'Stopping' ${NAME} automatic config updates (does nothing)."
+    ;;
+
+  restart|reload|force-reload)
+    /bin/echo "No daemon to (force-)re[start|load] in ${NAME}"
+    ;;
+
+  *)
+    /bin/echo "Usage: $0 {start}"
+
+    exit 1
+    ;;
+
+esac
+
+exit 0
