Package: apt-proxy Version: 1.9.26 Severity: minor Tags: patch Currently, the "/etc/init.d/apt-proxy stop" may do some output without closing bracket: root:/etc/init.d# ./apt-proxy restart Stopping apt-proxy [wait 2. Starting apt-proxy.
Additionally, the script *always* sleeps for one second, which adds to the shutdown delay. Here is some additional patch to avoid this. If apt-proxy is fast (or the machine slow?), no sleep is necessary. If waiting is necessary, output starts with "[wait 1" (and not "[wait 2") and correctly closes the bracket. Additionally, in case the daemon wouldn't respond at all (never seen), output finishes with "aborted]." =================================================================== RCS file: /etc/init.d/RCS/apt-proxy,v retrieving revision 1.1.1.1 diff -u -r1.1.1.1 /etc/init.d/apt-proxy --- /etc/init.d/apt-proxy 2005-02-23 00:59:27+01 1.1.1.1 +++ /etc/init.d/apt-proxy 2005-02-25 12:18:23+01 @@ -48,21 +48,26 @@ stop) echo -n "Stopping apt-proxy" + start-stop-daemon --stop --quiet --pidfile $pidfile + # + # Continue stopping until daemon finished or time over + # count=0 pid=$(cat $pidfile 2>/dev/null) while alive $pid; do - start-stop-daemon --stop --quiet --pidfile $pidfile - count=$(expr $count + 1) if [ $count -gt 20 ]; then + echo -n " aborted" break; - elif [ $count = 2 ]; then + elif [ $count = 1 ]; then echo -n " [wait $count" - elif [ $count -gt 2 ]; then + elif [ $count -gt 1 ]; then echo -n " $count" fi + count=$(expr $count + 1) sleep 1 + start-stop-daemon --stop --quiet --pidfile $pidfile done - if [ $count -gt 2 ]; then + if [ $count -gt 1 ]; then echo -n "]" fi echo "." =================================================================== -- System Information: Debian Release: 3.1 APT prefers testing APT policy: (990, 'testing'), (500, 'unstable') Architecture: i386 (i686) Kernel: Linux 2.6.7-1-k7 Locale: [EMAIL PROTECTED], [EMAIL PROTECTED] (charmap=ISO-8859-15) Versions of packages apt-proxy depends on: ii bzip2 1.0.2-1 A high-quality block-sorting file ii debconf 1.4.30.11 Debian configuration management sy ii logrotate 3.7-2 Log rotation utility ii python 2.3.4-5 An interactive high-level object-o ii python-apt 0.5.10 Python interface to libapt-pkg ii python-bsddb3 3.3.0-6 Python interface to libdb3 ii python-twisted 1.3.0-8 Event-based framework for internet ii python2.3 2.3.5-1 An interactive high-level object-o -- debconf information excluded -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]