Package: nis
Version: 3.17
Severity: wishlist
Tags: patch
User: [EMAIL PROTECTED]
Usertags: origin-ubuntu intrepid ubuntu-patch

Hi,

For daemons that do not require clean shutdown to perform their
operation it is possible to not explicitly stop the daemon in
runlevels 0 and 6, and let sendsigs take care of stopping the
daemon.

This has been used in Ubuntu for a while to speed up the shutdown
process. The policy has recently been changed to make it compatible
with Debian, and so I am now forwarding you the patch that can
help to bring these benefits in to Debian.

Please consider applying the attached patch.

You will also need a postinst snippet to remove the existing stop
links. This will look something like

# Remove shutdown and reboot links; this init script does not need them.
if dpkg --compare-versions "$2" lt "<version where patch is applied>";
then
       rm -f /etc/rc0.d/K18nis /etc/rc6.d/K18nis
fi

I currently putted <version where patch is applied> to nis_3.17-18

You can read more on this subject at

https://wiki.ubuntu.com/Teardown
https://lists.ubuntu.com/archives/ubuntu-devel-announce/2008-June/000430.html
http://lists.debian.org/debian-devel/2008/07/msg00005.html
diff -Nurp nis-3.17/debian/postinst nis-3.17_patched/debian/postinst
--- nis-3.17/debian/postinst	2008-09-04 21:18:45.000000000 +0200
+++ nis-3.17_patched/debian/postinst	2008-09-04 21:33:31.000000000 +0200
@@ -70,7 +70,7 @@ then
 fi
 # The user may have decided to remove the init script...
 if [ -x /etc/init.d/nis ]; then
-	update-rc.d nis defaults 18 >/dev/null 2>&1
+	update-rc.d nis start 18 2 3 4 5 . stop 18 1 . >/dev/null 2>&1
 fi
 
 # Convert the old ypserv.conf to the new format.
@@ -91,6 +91,11 @@ db_stop
 # The user may have decided to remove the init script...
 if [ -x /etc/init.d/nis ]; then
 	invoke-rc.d nis restart
+
+	# Remove shutdown and reboot links; this init script does not need them.
+	if dpkg --compare-versions "$2" lt "nis_3.17-18"; then
+		rm -f /etc/rc0.d/K18nis /etc/rc6.d/K18nis
+	fi
 fi
 
 # /sbin/unix_chkpwd is installed setgid shadow by default; for NIS we need
diff -Nurp nis-3.17/debian/rc.nis nis-3.17_patched/debian/rc.nis
--- nis-3.17/debian/rc.nis	2008-09-04 21:18:45.000000000 +0200
+++ nis-3.17_patched/debian/rc.nis	2008-09-04 21:22:46.000000000 +0200
@@ -7,7 +7,7 @@
 # Required-Start:	$network $portmap
 # Required-Stop:	$portmap
 # Default-Start:	2 3 4 5
-# Default-Stop:		0 1 6
+# Default-Stop:		1
 # Short-Description:	Start NIS client and server daemons.
 # Description:		Start NIS client and server daemons.  NIS is mostly 
 #			used to let several machines in a network share the 

Reply via email to