-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Jonas Smedegaard wrote:
| On 29-03-2005 08:14, Wen-chien Jesse Sung wrote:
|
|
|>>upgrade from 7:2002edebian1-6 and got this:
|
|
| Did you try (and fail) upgrading to -6.1 before that?
|
| If so, I believe it is a bug in -6.1 which has been solved since (but
| without a workaround for those bitten by the bug).

Yes, I tried to upgrade to -6.1 and failed several days ago, and then I
downgrade it to -6.

Humm... Maybe the update-inetd should not be run if
/var/cache/ipopd_inetd.conf_copy exists.
How about the attached diff that against -8? I don't know whether the
test for "version less then -6"
is needed or not, so it's still there.

- --
Best Regards,
Wen-chien Jesse Sung
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.0 (GNU/Linux)

iD8DBQFCSUoSlZ/JOHsLIwgRAunnAKCQGa38R/1PbSnCNem+DFPagmwc6gCg2ZGG
cwivaUkqQpfh7+dniThnx8Q=
=EezS
-----END PGP SIGNATURE-----
--- postinst.orig       2005-03-29 19:50:53.003087417 +0800
+++ postinst    2005-03-29 20:07:42.893023637 +0800
@@ -9,39 +9,38 @@
 db_version 2.0
 
 if [ "$1" = "configure" ]; then
-       if [ -z "$2" ]; then
-               UPDATE_INETD_ARG='--group mail --add'
-               UPDATE_INETD_ARG_EXTRA="        stream  tcp     nowait  root    
/usr/sbin/tcpd"
-       else
-               UPDATE_INETD_ARG='--enable'
+       RUN_INETD_UPDATE=1
+       UPDATE_INETD_ARG='--group mail --add'
+       UPDATE_INETD_ARG_EXTRA="        stream  tcp     nowait  root    
/usr/sbin/tcpd"
+       
+       if [ -n "$2" ]; then
+               UPDATE_INETD_ARG="--enable ${UPDATE_INETD_ARG}"
 
        # Bug#295306
-       if dpkg --compare-versions "$2" le 7:2002edebian1-6; then
-               MY_FILE=/var/cache/${PROGRAM}_inetd.conf_copy
-               if [ -r "$MY_FILE" ]; then
-                       while read line; do
-                               update-inetd --group mail --add "$line"
-                       done < "$MY_FILE"
-                       rm -f "$MY_FILE"
-               else
-                       # The file has disappeared, or we're installing from
-                       # 'config files' state. Install default entries.
-                       UPDATE_INETD_ARG='--group mail --add'
-                       UPDATE_INETD_ARG_EXTRA="        stream  tcp     nowait  
root    /usr/sbin/tcpd"
+               if dpkg --compare-versions "$2" le 7:2002edebian1-6; then
+                       MY_FILE=/var/cache/${PROGRAM}_inetd.conf_copy
+                       if [ -r "$MY_FILE" ]; then
+                               while read line; do
+                                       update-inetd --group mail --add "$line"
+                               done < "$MY_FILE"
+                               rm -f "$MY_FILE"
+                               RUN_INETD_UPDATE=0
                        fi
                fi
        fi
 
-       db_get ipopd/protocol
-       for i in `echo "$RET" | sed 's/,/ /g'`; do
-               if [ "$i" = "pop2" ]; then
-                       update-inetd $UPDATE_INETD_ARG 
"pop2${UPDATE_INETD_ARG_EXTRA} /usr/sbin/ipop2d"
-               elif [ "$i" = "pop3" ]; then
-                       update-inetd $UPDATE_INETD_ARG 
"pop3${UPDATE_INETD_ARG_EXTRA} /usr/sbin/ipop3d"
-               elif [ "$i" = "pop3s" ]; then
-                       update-inetd $UPDATE_INETD_ARG 
"pop3s${UPDATE_INETD_ARG_EXTRA} /usr/sbin/ipop3d"
-               fi
-       done
+       if [ "$RUN_INETD_UPDATE" = "1" ]; then
+               db_get ipopd/protocol
+               for i in `echo "$RET" | sed 's/,/ /g'`; do
+                       if [ "$i" = "pop2" ]; then
+                               update-inetd $UPDATE_INETD_ARG 
"pop2${UPDATE_INETD_ARG_EXTRA} /usr/sbin/ipop2d"
+                       elif [ "$i" = "pop3" ]; then
+                               update-inetd $UPDATE_INETD_ARG 
"pop3${UPDATE_INETD_ARG_EXTRA} /usr/sbin/ipop3d"
+                       elif [ "$i" = "pop3s" ]; then
+                               update-inetd $UPDATE_INETD_ARG 
"pop3s${UPDATE_INETD_ARG_EXTRA} /usr/sbin/ipop3d"
+                       fi
+               done
+       fi
 fi
 
 cd /etc/ssl/certs

Reply via email to