[Pkg-ocaml-maint-commits] [SCM] approx upstream and debian packaging branch, master, updated. debian/5.1-1.1-16-gb1e4ac9
Eric Cooper
ecc at cmu.edu
Mon May 28 23:50:34 UTC 2012
The following commit has been merged in the master branch:
commit c5b768bc77aaa60b131c77e59c8f340143835172
Author: Eric Cooper <ecc at 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
More information about the Pkg-ocaml-maint-commits
mailing list