[or-cvs] r13206: Change wording if debian-tor's homedir is wrong, do not prin (tor/trunk/debian)

weasel at seul.org weasel at seul.org
Mon Jan 21 14:46:49 UTC 2008


Author: weasel
Date: 2008-01-21 09:46:49 -0500 (Mon, 21 Jan 2008)
New Revision: 13206

Modified:
   tor/trunk/debian/changelog
   tor/trunk/debian/tor.postinst
Log:
Change wording if debian-tor's homedir is wrong, do not print anything if it is ok.
Whitespace nazi found out about debian/tor.postinst.

Modified: tor/trunk/debian/changelog
===================================================================
--- tor/trunk/debian/changelog	2008-01-21 14:44:56 UTC (rev 13205)
+++ tor/trunk/debian/changelog	2008-01-21 14:46:49 UTC (rev 13206)
@@ -4,8 +4,10 @@
     to have a uid between 100 and 999.  There is no good reason
     to require this.  If the local admin moves the system users/uid-space
     to some other range then they probably have a good reason for that.
+  * postinst: change wording if debian-tor's homedir is wrong, do not
+    print anything if it is ok.
 
- -- Peter Palfrader <weasel at debian.org>  Mon, 21 Jan 2008 15:43:52 +0100
+ -- Peter Palfrader <weasel at debian.org>  Mon, 21 Jan 2008 15:46:29 +0100
 
 tor (0.2.0.17-alpha-1) experimental; urgency=low
 

Modified: tor/trunk/debian/tor.postinst
===================================================================
--- tor/trunk/debian/tor.postinst	2008-01-21 14:44:56 UTC (rev 13205)
+++ tor/trunk/debian/tor.postinst	2008-01-21 14:46:49 UTC (rev 13206)
@@ -9,24 +9,25 @@
 # the sanit(ar)y checks otherwise we can safely create it.
 
 if [ "$uid" ]; then
-    if [ "$home" = "/var/lib/tor" ]; then
-        echo "debian-tor homedir check: ok"
-    else
-	echo "ERROR: debian-tor account has an invalid home directory!"
-	echo "Please check /usr/share/doc/tor/README.Debian on how to"
-	echo "correct this problem"
-	exit 1
-    fi
+	if [ "$home" = "/var/lib/tor" ]; then
+		:
+		#echo "debian-tor homedir check: ok"
+	else
+		echo "ERROR: debian-tor account has an unexpected home directory!"
+		echo "It should be '/var/lib/tor', but it is '$home'."
+		echo "Removing the debian-tor user might fix this, but the question"
+		echo "remains how you got into this mess to begin with."
+		exit 1
+	fi
 else
-    # what this might mean?? oh creating a system l^Huser!
-    adduser --quiet \
-            --system \
-            --disabled-password \
-            --home /var/lib/tor \
-	    --no-create-home \
-	    --shell /bin/bash \
-	    --group \
-    debian-tor
+	adduser --quiet \
+		--system \
+		--disabled-password \
+		--home /var/lib/tor \
+		--no-create-home \
+		--shell /bin/bash \
+		--group \
+		debian-tor
 fi
 
 # ch{owning,moding} things around



More information about the tor-commits mailing list