]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
postinst: if we reboot between unpacking and configuring on some smart systems
authorPeter Palfrader <peter@palfrader.org>
Mon, 21 Jan 2008 15:00:34 +0000 (15:00 +0000)
committerPeter Palfrader <peter@palfrader.org>
Mon, 21 Jan 2008 15:00:34 +0000 (15:00 +0000)
this will mean that we just lost /var/run/tor - creating it in the maintainer
script if it doesn't exist.

svn:r13208

debian/changelog
debian/tor.postinst

index d04fdcfe01e26e74c0dfc9072626ea3b740f0a26..27792eaedeb66c9b517f3b9d8990309684b425c2 100644 (file)
@@ -12,8 +12,11 @@ tor (0.2.0.17-alpha-1+svn) experimental; urgency=low
     and then later re-installed again.  Now we ensure proper ownership
     and modes for all the directories and files below /var/{lib,run,log}/tor
     (the dirs themselves included) every time we run postinst.
+  * postinst: if we reboot between unpacking and configuring on some smart
+    systems this will mean that we just lost /var/run/tor - creating it
+    in the maintainer script if it doesn't exist.
 
- -- Peter Palfrader <weasel@debian.org>  Mon, 21 Jan 2008 15:56:12 +0100
+ -- Peter Palfrader <weasel@debian.org>  Mon, 21 Jan 2008 15:59:54 +0100
 
 tor (0.2.0.17-alpha-1) experimental; urgency=low
 
index efc7e251439b1c8d5940c36ff8ce0c45c06ef08b..70b14eec9a7660f8f6baea3128f0c542e628d4de 100644 (file)
@@ -31,6 +31,14 @@ else
 fi
 
 
+for i in lib run log; do
+       if ! [ -d "/var/$i/tor" ]; then
+               echo "Something or somebody made /var/$i/tor disappear."
+               echo "Creating one for you again."
+               mkdir "/var/$i/tor"
+       fi
+done
+
 find /var/lib/tor ! -user debian-tor -o ! -group debian-tor -print0 | xargs -0 --no-run-if-empty chown debian-tor:debian-tor
 find /var/lib/tor -type d -print0 | xargs -0 --no-run-if-empty chmod 02700
 find /var/lib/tor -type f -print0 | xargs -0 --no-run-if-empty chmod 00600