r290 - /web/deps/dep9.mdwn

sez at users.alioth.debian.org sez at users.alioth.debian.org
Sun Jun 3 22:16:25 UTC 2012


Author: sez
Date: Sun Jun  3 22:16:24 2012
New Revision: 290

URL: http://svn.debian.org/wsvn/dep/?sc=1&rev=290
Log:
dep9: update proposed postinst snippet

based on feedback from the transition of nyancat-server

Modified:
    web/deps/dep9.mdwn

Modified: web/deps/dep9.mdwn
URL: http://svn.debian.org/wsvn/dep/web/deps/dep9.mdwn?rev=290&op=diff
==============================================================================
--- web/deps/dep9.mdwn (original)
+++ web/deps/dep9.mdwn Sun Jun  3 22:16:24 2012
@@ -3,7 +3,7 @@
     Title: inet-superserver configuration by maintainer scripts
     DEP: 9
     State: CANDIDATE
-    Date: 2012-05-20
+    Date: 2012-06-03
     Drivers: Serafeim Zanikolas <sez at debian.org>
     URL: http://dep.debian.net/deps/dep9
     Source: http://anonscm.debian.org/viewvc/dep/web/deps/dep9.mdwn
@@ -203,27 +203,39 @@
 * depend on both update-inetd and reconf-inetd
 * install a reconf-inetd fragment in /usr/share/reconf-inetd, as a regular
   file (ie. not as a conffile);
-* drop any references to update-inetd in postrm, and modify postinst to remove
-  any inetd.conf entries for that package that were previously added using
-  update-inetd, assuming they have not had local changes
-
-Below is an example postinst snippet for the ftpd-ssl server package (assuming
-it ships /usr/share/reconf-inetc/ftpd-ssl.xinetd):
+* drop any references to update-inetd in postrm
+* modify postinst to (i) remove any inetd.conf entries for that package that
+  were previously added using update-inetd, assuming they have not had local
+  changes; (ii) run reconf-inetd to re-add new inetd.conf entries that might
+  have been removed by update-inetd (if the reconf-inetd trigger ran before
+  postinst)
+
+Below is an example postinst snippet for the ftpd-ssl server package:
 
 <pre>
+    # exact inetd.conf entry previously added using update-inetd
+    OLD_FTPENTRY="ftp	stream	tcp	nowait	root	/usr/sbin/tcpd	/usr/sbin/in.ftpd"
+    # first release that uses reconf-inetd
+    REL="x.y.z"
+
     case $1 in
         configure)
             # remove inetd.conf entry if not modified locally, and not managed
             # already by reconf-inetd
-            if fgrep -q '^exact entry previously added by update-inetd$' /etc/inetd.conf \
-                -a ! -e /var/lib/reconf-inetd/ftpd-ssl.xinetd; then
-                if which update-inetd; then
-                    update-inetd --remove ftp
+            if dpkg --compare-versions "$2" lt-nl "$REL"; then
+                if fgrep -qx "$OLD_FTPENTRY" || fgrep -qx '#<off># $OLD_FTPENTRY"; then
+                    # remove all inetd.conf entries for ftpd-ssl
+                    update-inetd --multi --pattern ftpd-ssl --remove ftp || true
+                    # re-add entries that are managed by reconf-inetd
+                    reconf-inetd || true
                 fi
             fi
         ;;
     esac
 </pre>
+
+If you are going to invoke update-inetd using --multi as shown above (to avoid
+prompting the user about multiple entries) you need update-inetd (>= 4.43).
 
 1) in later stable Debian releases, simply drop update-inetd all together
 (dependency and postinst snippet)




More information about the dep-commits mailing list