[28436] in Source-Commits
dns-config commit: Drop the initscript
daemon@ATHENA.MIT.EDU (Jonathan D Reed)
Fri Sep 19 17:26:12 2014
Date: Fri, 19 Sep 2014 17:26:06 -0400
From: Jonathan D Reed <jdreed@mit.edu>
Message-Id: <201409192126.s8JLQ6I3019945@drugstore.mit.edu>
To: source-commits@mit.edu
https://github.com/mit-athena/dns-config/commit/6a0f8f848b4b3fcd25ec0007fdbfb499046c0205
commit 6a0f8f848b4b3fcd25ec0007fdbfb499046c0205
Author: Jonathan Reed <jdreed@mit.edu>
Date: Tue Sep 16 14:56:28 2014 -0400
Drop the initscript
- Drop the init script (Trac: #1535)
- rm_conffile it and remove it from rc.d
- if there is an active lo.debathena-dns-config profile,
unload it in the postinst
debian/changelog | 8 ++++++++
debian/control | 6 ++----
debian/debathena-dns-config.init | 31 -------------------------------
debian/debathena-dns-config.maintscript | 2 ++
debian/debathena-dns-config.postinst | 11 +++++++----
5 files changed, 19 insertions(+), 39 deletions(-)
diff --git a/debian/changelog b/debian/changelog
index 1e3f726..c99fbfd 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,11 @@
+debathena-dns-config (1.11) unstable; urgency=low
+
+ * Give up on the initscript, because it used the wrong resolvconf
+ profile to begin with (lo.* are Special(tm) for dnsmasq) and because a
+ cluster machine's network should now be configured at install time.
+
+ -- Jonathan Reed <jdreed@mit.edu> Tue, 16 Sep 2014 14:56:23 -0400
+
debathena-dns-config (1.10) unstable; urgency=low
* Do not Conflict bind9, instead just let APT decide to autoremove it later
diff --git a/debian/control b/debian/control
index cc4dab6..7faffbe 100644
--- a/debian/control
+++ b/debian/control
@@ -2,7 +2,7 @@ Source: debathena-dns-config
Section: debathena-config/net
Priority: extra
Maintainer: Debathena Project <debathena@mit.edu>
-Build-Depends: debhelper (>= 7.0.50~), config-package-dev (>= 5.0~)
+Build-Depends: debhelper (>= 8.1.0~), config-package-dev (>= 5.0~)
Standards-Version: 3.9.3
Package: debathena-dns-config
@@ -10,6 +10,4 @@ Architecture: all
Depends: dnsmasq, resolvconf, ${misc:Depends}
Description: Sets up a local caching nameserver using dnsmasq
This package sets up a local caching nameserver using dnsmasq. It is
- intended for use primarily on IS&T-managed public workstations, but may
- be used on other workstations with a static IP address configured by
- ifupdown. Install this package at your own risk.
+ intended for use primarily on IS&T-managed public workstations.
diff --git a/debian/debathena-dns-config.init b/debian/debathena-dns-config.init
deleted file mode 100644
index a3046bc..0000000
--- a/debian/debathena-dns-config.init
+++ /dev/null
@@ -1,31 +0,0 @@
-#!/bin/sh
-#
-### BEGIN INIT INFO
-# Provides: debathena-dns-config
-# Required-Start: resolvconf
-# Required-Stop: resolvconf
-# Default-Start: 2 3 4 5
-# Default-Stop: 0 1 6
-# Short-Description: Debathena DNS configuration for MIT
-# Description: This service provides a mit.edu search path to
-# resolvconf.
-### END INIT INFO
-#
-# This script is part of the debathena-dns-config package
-# See /usr/share/doc/debathena-dns-config/copyright
-
-[ -x /sbin/resolvconf ] || exit 0
-
-case "$1" in
-restart|start)
- if ! egrep -qi '^[[:space:]]+dns-search mit.edu' /etc/network/interfaces; then
- echo "search mit.edu" | /sbin/resolvconf -a lo.debathena-dns-config
- fi
- ;;
-
-stop|reload|force-reload)
- ;;
-*)
- echo "Unknown action: $1"
- ;;
-esac
diff --git a/debian/debathena-dns-config.maintscript b/debian/debathena-dns-config.maintscript
new file mode 100644
index 0000000..6a41846
--- /dev/null
+++ b/debian/debathena-dns-config.maintscript
@@ -0,0 +1,2 @@
+# We killed this in 1.11
+rm_conffile /etc/init.d/debathena-dns-config 1.10
diff --git a/debian/debathena-dns-config.postinst b/debian/debathena-dns-config.postinst
index 7e84fc5..1f54031 100644
--- a/debian/debathena-dns-config.postinst
+++ b/debian/debathena-dns-config.postinst
@@ -22,10 +22,13 @@ set -e
case "$1" in
configure)
- if hash invoke-rc.d 2>/dev/null; then
- invoke-rc.d debathena-dns-config restart
- else
- /etc/init.d/debathena-dns-config restart
+ # If we're upgrading, delete the old lo.debathena-dns-config
+ # profile, which was a terrible idea to begin with.
+ if dpkg --compare-versions "$2" le 1.10~; then
+ # This runs after the debhelper stuff, so it should
+ # have rm_conffile'd it at this point.
+ update-rc.d debathena-dns-config remove || :
+ resolvconf -d lo.debathena-dns-config
fi
if ! grep -q '^nameserver' /etc/resolv.conf; then
# Don't leave people without a nameserver