The following commit has been merged in the master branch:
commit c5b768bc77aaa60b131c77e59c8f340143835172
Author: Eric Cooper <e...@cmu.edu>
Date:   Sat Apr 28 17:56:50 2012 -0400

    check for custom inetd.conf entry when updating (closes: #627053)

diff --git a/debian/approx.postinst b/debian/approx.postinst
index c87c234..2203bf5 100644
--- a/debian/approx.postinst
+++ b/debian/approx.postinst
@@ -18,12 +18,14 @@ if [ ! -d /var/cache/approx ]; then
 fi
 
 # first remove any "vanilla" entry from /etc/inetd.conf
-update-inetd --remove '^(\d|\w)+\s.*\bapprox\b'
+update-inetd --remove '^(\d|\w)+\s.*\bapprox\s+/usr/sbin/approx'
 
-# add entry to /etc/inetd.conf
-db_get approx/port
-port="$RET"
-update-inetd --add "$port\t\tstream\ttcp\tnowait\tapprox\t/usr/sbin/approx 
/usr/sbin/approx"
+# add entry to /etc/inetd.conf unless there is already a custom one
+if ! egrep -q '^[^#].*\s/usr/sbin/approx\b' /etc/inetd.conf; then
+    db_get approx/port
+    port="$RET"
+    update-inetd --add "$port\t\tstream\ttcp\tnowait\tapprox\t/usr/sbin/approx 
/usr/sbin/approx"
+fi
 
 if dpkg --compare-versions "$2" lt "4.0"; then
     if [ -f /etc/default/approx ]; then

-- 
approx upstream and debian packaging

_______________________________________________
Pkg-ocaml-maint-commits mailing list
Pkg-ocaml-maint-commits@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-ocaml-maint-commits

Reply via email to