Fix test for user existence
authorPaul Crowley <paul@lshift.net>
Fri, 20 Feb 2009 11:37:58 +0000
changeset 47 ebcc230f21e4
parent 46 d2bbab5ffd0e
child 48 f0cb7ad9e4ab
Fix test for user existence
install
--- a/install	Fri Feb 20 11:37:42 2009 +0000
+++ b/install	Fri Feb 20 11:37:58 2009 +0000
@@ -24,7 +24,7 @@
 install -o root -g root -d /etc/mercurial-server/keys/root
 install -o root -g root -d /etc/mercurial-server/keys/users
 
-if [ x$(getent passwd hg) == x ] ; then
+if [ x$(getent passwd hg | wc -c) = x0 ] ; then
     adduser --system --shell /bin/sh --group --disabled-password \
         --gecos "Mercurial repositories" hg
     su -c /usr/local/lib/mercurial-server/init/hginit hg