diff options
author | Nick Mathewson <nickm@torproject.org> | 2005-05-15 05:01:49 +0000 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2005-05-15 05:01:49 +0000 |
commit | cce89badb7b9119b1c71df6032726e32b87e2356 (patch) | |
tree | 48c4694d3473897b819bb586498a7ba4329d4f1a /tor.spec.in | |
parent | 28195a0eb140ef4be2e05c406eaa7a751d50db08 (diff) | |
download | tor-cce89badb7b9119b1c71df6032726e32b87e2356.tar.gz tor-cce89badb7b9119b1c71df6032726e32b87e2356.zip |
Set tor home directory to something more reasonable when first installing.
svn:r4229
Diffstat (limited to 'tor.spec.in')
-rw-r--r-- | tor.spec.in | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/tor.spec.in b/tor.spec.in index a8c100d90f..044ab5935c 100644 --- a/tor.spec.in +++ b/tor.spec.in @@ -201,9 +201,10 @@ if [ ! -n "`/usr/bin/id -u %{runuser} 2>/dev/null`" ]; then # One would also like to default the UID, but doing that properly would # also require thought. if [ -x /sbin/nologin ]; then - %{_sbindir}/useradd -r -g %{runuser} -d / -s /sbin/nologin %{runuser} 2> /dev/null + if [ -x /sbin/nologin ]; then + %{_sbindir}/useradd -r -g %{runuser} -d %{localstatedir}/lib/%{name} -s /sbin/nologin %{runuser} 2> /dev/null else - %{_sbindir}/useradd -r -g %{runuser} -d / -s /bin/false %{runuser} 2> /dev/null + %{_sbindir}/useradd -r -g %{runuser} -d %{localstatedir}/lib/%{name} -s /bin/false %{runuser} 2> /dev/null fi fi exit 0 |