From e33bb1e6e294315dfdc6ac665772e029ebbfced8 Mon Sep 17 00:00:00 2001 From: Steve Langasek Date: Sat, 1 Feb 2014 11:51:58 -0500 Subject: [PATCH] Fix obsolete invocations of update-rc.d by switching nfs-common to use dh_installinit. Closes: #736059. --- debian/changelog | 2 ++ debian/nfs-common.postinst | 7 +------ debian/nfs-common.postrm | 2 -- debian/nfs-common.prerm | 7 ------- debian/rules | 2 +- 5 files changed, 4 insertions(+), 16 deletions(-) diff --git a/debian/changelog b/debian/changelog index 9cb0530..212715d 100644 --- a/debian/changelog +++ b/debian/changelog @@ -8,6 +8,8 @@ nfs-utils (1:1.2.8-6) UNRELEASED; urgency=medium * Only start nfs-common in runlevel S; it doesn't need to be started more than once (and startpar won't actually run it more than once, anyway). Closes: #510528. + * Fix obsolete invocations of update-rc.d by switching nfs-common to use + dh_installinit. Closes: #736059. -- Steve Langasek Mon, 13 Jan 2014 22:19:43 +0000 diff --git a/debian/nfs-common.postinst b/debian/nfs-common.postinst index 866c066..96aa391 100644 --- a/debian/nfs-common.postinst +++ b/debian/nfs-common.postinst @@ -2,8 +2,6 @@ set -e -#DEBHELPER# - case "$1" in configure) ucf --three-way /usr/share/nfs-common/conffiles/idmapd.conf /etc/idmapd.conf @@ -12,7 +10,6 @@ case "$1" in if [ "$2" != "" ] && dpkg --compare-versions "$2" lt 1:1.1.0-10; then update-rc.d -f nfs-common remove >/dev/null fi - update-rc.d nfs-common start 20 2 3 4 5 . stop 20 0 1 6 . start 44 S . >/dev/null if ! getent passwd statd >/dev/null; then adduser --system --home /var/lib/nfs --no-create-home statd @@ -44,6 +41,4 @@ case "$1" in ;; esac -act="restart" -[ "$1:$2" = "configure:" ] && act="start" -invoke-rc.d nfs-common $act +#DEBHELPER# diff --git a/debian/nfs-common.postrm b/debian/nfs-common.postrm index 1f8f1eb..9abe8c2 100644 --- a/debian/nfs-common.postrm +++ b/debian/nfs-common.postrm @@ -6,8 +6,6 @@ set -e case "$1" in purge) - update-rc.d nfs-common remove >/dev/null - for FILE in /etc/default/nfs-common /etc/idmapd.conf; do # Taken from the ucf example postrm for ext in '~' '%' .bak .dpkg-tmp .dpkg-new .dpkg-old .dpkg-dist; do diff --git a/debian/nfs-common.prerm b/debian/nfs-common.prerm index 08e0ca9..c6d2a72 100644 --- a/debian/nfs-common.prerm +++ b/debian/nfs-common.prerm @@ -4,13 +4,6 @@ set -e #DEBHELPER# -case "$1" in - remove|purge) - [ -x /etc/init.d/nfs-common ] && - invoke-rc.d nfs-common stop - ;; -esac - if [ "$1" != upgrade ] then rm -f /var/lib/nfs/sm/* \ diff --git a/debian/rules b/debian/rules index 204ac7a..569c416 100755 --- a/debian/rules +++ b/debian/rules @@ -55,7 +55,7 @@ binary-arch: build dh_install -Xman --fail-missing dh_installdocs -A dh_installdocs -pnfs-common debian/README.Debian.nfsv4 - install -m 0755 debian/nfs-common.init debian/nfs-common/etc/init.d/nfs-common + dh_installinit -pnfs-common -R install -m 0755 debian/nfs-kernel-server.init debian/nfs-kernel-server/etc/init.d/nfs-kernel-server install -m 0644 debian/nfs-common.bugcontrol debian/nfs-common/usr/share/bug/nfs-common/control install -m 0755 debian/nfs-common.bugscript debian/nfs-common/usr/share/bug/nfs-common/script -- 2.39.5