-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
Jonas Smedegaard wrote: | I don't like putting too much effort into solving this bug, then. | | Keeping the code relatively sane to avoid bugs hitting users of stable | Debian releases is much more important than handling bugs hitting only | those (possibly many) choosing to live on the edge and running testing | releases. Especially when the workaround is simply to try installing again.
I guess it affects users of stable Debian releases if -8 gets into next stable release.
| I may have lost you (my mind is at several places simultanously - quite | annoying actually, but not your fault), but the bug in -6.1 causes | _wrong_ info in the cache file. Can't see how you will sanely handle | that situation (without special code for that single release). | | As I understand it, it should always be safe to do update-inetd (or if | not, we can't trust our own knowledge of the world, and then we should | fail rather than go silent about it!).
It's not about "do update-inetd or not", it's about "do update-inetd with invalid arguments".
By the previous diff, I try to skip running update-inetd after the while-loop restore my inetd.conf and $UPDATE_INETD_ARG_EXTRA is null. It's a *wrong* try, since if I enable more protocols in debconf, they won't be handled. And, no, it does not handle the wrong cache file. It's just a try to deal with the invalid arguments of update-inetd. Feel free to drop it.
| I appreciate your efforts, but please if you want to help improve the | code then have a close look at my work-in-progress on -9 (the file | "___PKG__.postinst.in" - also see if you can spot errors in my changed | code!): http://debian.jones.dk/auryn/pool/official/uw-imap/debian-test/
With my limited knowledge about maintainer scripts: For people upgrades ipopd from versions less than or equal to -6 (applies to stable users), 1. line23: true. 2. I have a pop3s line in /etc/inetd.conf. line 25 will be true, line 26 through 29 ~ executed, restore my pop3s settings in inet.conf, and then goto line 39. 3. line 46 invoke update-inetd with $UPDATE_INETD_ARG='--enable' and ~ $UPDATE_INETD_ARG_EXTRA='', that is ~ update-inetd --enable "pop3s /usr/sbin/ipop3d" ~ And update-inetd fails with ~ "The service name may not include a whitespace character!"
- -- Best Regards, Wen-chien Jesse Sung
-----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.0 (GNU/Linux)
iD8DBQFCSmQilZ/JOHsLIwgRArbtAJ0f9+/YZxZ0i0anAGfZd0s0ZkKd2QCg7b/5 4n0VEnLocfnb4BzmSPwdF/k= =GR3A -----END PGP SIGNATURE-----
#!/bin/sh
set -e group="__INETDGRP__" # inetd group pkgname="__PKG__" # basename of package certname="__CERTNAME__" # basename of certificate description="__DESC__" # descriptive text daemonsets="__DAEMONSETS__" # space-seperated list of colon-seperated list of port and binary name (or path if not /usr/sbin) # Source debconf library. . /usr/share/debconf/confmodule db_version 2.0 if [ "$1" = "configure" ]; then if [ -z "$2" ]; then UPDATE_INETD_ARG="--group \"$inetgroup\" --add" UPDATE_INETD_ARG_EXTRA=" stream tcp nowait root /usr/sbin/tcpd" else UPDATE_INETD_ARG='--enable' # Bug#295306 if dpkg --compare-versions "$2" le 7:2002edebian1-6; then MY_FILE=/var/cache/${pkgname}_inetd.conf_copy if [ -r "$MY_FILE" ]; then while read line; do update-inetd --group "$inetgroup" --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 \"$inetgroup\" --add" UPDATE_INETD_ARG_EXTRA=" stream tcp nowait root /usr/sbin/tcpd" fi fi fi db_get "$pkgname/protocol" for debconf_entry in `echo "$RET" | tr ',' ' '`; do seen="" for daemonset in $daemonsets; do service="`echo "$daemonset" | awk -F: '{ print $1 }'`" binary="`echo "$daemonset" | awk -F: '{ print $2 }' | sed 's,^\([^/]\),/usr/sbin/\1,'`" if [ "$debconf_entry" = "$service" ]; then update-inetd $UPDATE_INETD_ARG "${service}${UPDATE_INETD_ARG_EXTRA} $binary" seen="yes" break fi done if [ "$seen" != "yes" ]; then echo "WARNING: Unsupported debconf value \"$daemon_entry\" in \"$pkgname/protocol\"" >/dev/stderr fi done fi cd /etc/ssl/certs PATH=$PATH:/usr/bin/ssl if [ -f "$certname.pem" ]; then echo "You already have /etc/ssl/certs/$certname.pem" else echo "Creating generic self-signed certificate: /etc/ssl/certs/$certname.pem" echo "(replace with hand-crafted or authorized one if needed)." HOSTNAME=`hostname -s` FQDN=`hostname -f` MAILNAME=`cat /etc/mailname 2> /dev/null || hostname -f` openssl req -new -x509 -days 365 -nodes -out "$certname.pem" -keyout "$certname.pem" > /dev/null 2>&1 <<+ . . . $description $HOSTNAME $FQDN [EMAIL PROTECTED] + ln -sf "$certname.pem" `openssl x509 -noout -hash < "$certname.pem"`.0 chown root.root "/etc/ssl/certs/$certname.pem" chmod 0640 "/etc/ssl/certs/$certname.pem" fi #DEBHELPER# exit 0