Package: tor Version: 0.2.2.35-1 Severity: normal Tags: patch I did notice that when an old config has an control socket /var/run/tor.sock for example, the tor daemon will bail out with a security error. This at the moment will fail the whole upgrade process.
As I think the error is not fatal for the actual upgrade process, as we can fix the issue after the upgrade and restart the daemon, I believe it's in our intrest to add a protection again init failures. -- System Information: Debian Release: wheezy/sid APT prefers testing APT policy: (500, 'testing'), (1, 'experimental') Architecture: amd64 (x86_64) Kernel: Linux 3.1.0-1-amd64 (SMP w/4 CPU cores) Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8) Shell: /bin/sh linked to /bin/dash Versions of packages tor depends on: ii adduser 3.113 ii libc6 2.13-21 ii libevent-2.0-5 2.0.16-stable-1 ii libssl1.0.0 1.0.0e-3 ii zlib1g 1:1.2.3.4.dfsg-3 Versions of packages tor recommends: ii logrotate 3.7.8-6 ii tor-geoipdb <none> ii tsocks 1.8beta5-9.2 Versions of packages tor suggests: ii mixmaster <none> ii polipo 1.0.4.1-1.1 ii socat 1.7.1.3-1.2 ii tor-arm <none> ii xul-ext-torbutton 1.4.4.1-1
>From cb9a035febc422f5892a394b390184c92a23d383 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Carl=20F=C3=BCrstenberg?= <azat...@gmail.com> Date: Wed, 21 Dec 2011 13:26:52 +0100 Subject: [PATCH] Don't fail upgrade on tor init errors if some configuration is wrong and the tor daemon refuses to start, we shouldn't fail the whole upgrade process just because of this. Just keep the daemon unstarted and print out a message instead. --- debian/rules | 2 +- debian/tor.postinst | 5 +++++ 2 files changed, 6 insertions(+), 1 deletions(-) diff --git a/debian/rules b/debian/rules index e9acb1e..399177e 100755 --- a/debian/rules +++ b/debian/rules @@ -178,7 +178,7 @@ binary-common: dh_installdocs dh_installexamples dh_installlogrotate - dh_installinit + dh_installinit --error-handler=tor_error_init dh_installcron dh_installman dh_link diff --git a/debian/tor.postinst b/debian/tor.postinst index 4adece4..de25f3f 100644 --- a/debian/tor.postinst +++ b/debian/tor.postinst @@ -115,6 +115,11 @@ EOF fi fi +tor_error_init() { + echo "Tor was unable to start due to configuration errors."; + echo "Please fix them and manually restart the tor daemon using"; + echo " ´service start tor´"; +} #DEBHELPER# -- 1.7.7.3