summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarkus Nigbur <pyrania@gentoo.org>2003-12-11 15:52:05 +0000
committerMarkus Nigbur <pyrania@gentoo.org>2003-12-11 15:52:05 +0000
commit3fbc5d6dc6c190163340ac017d7f2f32dfba6256 (patch)
tree2684f54838b639226acb2f4ceb824884d05cff8f /sys-devel/distcc/files
parentmove dox bin to edox since the dox package uses /usr/bin/dox (diff)
downloadgentoo-2-3fbc5d6dc6c190163340ac017d7f2f32dfba6256.tar.gz
gentoo-2-3fbc5d6dc6c190163340ac017d7f2f32dfba6256.tar.bz2
gentoo-2-3fbc5d6dc6c190163340ac017d7f2f32dfba6256.zip
Fixed distcc-config bug
Diffstat (limited to 'sys-devel/distcc/files')
-rw-r--r--sys-devel/distcc/files/2.11.1p/distcc-config17
1 files changed, 10 insertions, 7 deletions
diff --git a/sys-devel/distcc/files/2.11.1p/distcc-config b/sys-devel/distcc/files/2.11.1p/distcc-config
index a5f303feeb75..fa88068b09fc 100644
--- a/sys-devel/distcc/files/2.11.1p/distcc-config
+++ b/sys-devel/distcc/files/2.11.1p/distcc-config
@@ -1,7 +1,7 @@
#!/usr/bin/env python
# Copyright 1999-2003 Gentoo Technologies, Inc.
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/sys-devel/distcc/files/2.11.1p/distcc-config,v 1.3 2003/12/06 17:31:04 lisa Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-devel/distcc/files/2.11.1p/distcc-config,v 1.4 2003/12/11 15:51:51 pyrania Exp $
import os, re, signal, sys, commands, pwd
from string import rstrip
@@ -101,14 +101,17 @@ if '--get-hosts' in tmpcmdline:
print HOSTS_ENV
elif os.path.exists(HOSTS_HOME) and os.path.getsize(HOSTS_HOME) != 0:
print HOSTS_HOME
- else:
+ elif os.path.exists('/etc/distcc/hosts'):
print rstrip(open('/etc/distcc/hosts', 'r').read())
+ else:
+ print 'No configuration file found. Setup your hosts with --set-hosts.'
elif '--set-hosts' in tmpcmdline:
if isroot(1):
- FILE = '/etc/distcc/hosts'
+ PATH = '/etc/distcc'
else:
- FILE = os.environ.get('HOME')+'/hosts'
- open(FILE, 'w').write(cmdline + '\n')
+ PATH = os.environ.get('HOME')
+ createdistccdir(PATH)
+ open(PATH+'/hosts', 'w').write(cmdline + '\n')
elif '--get-verbose' in tmpcmdline:
readenv('DISTCC_VERBOSE')
elif '--set-verbose' in tmpcmdline:
@@ -126,8 +129,8 @@ elif '--install' in tmpcmdline:
distcc_env.write('DCCC_PATH="/usr/lib/distcc/bin"\n')
distcc_env.write('DISTCC_VERBOSE="0"\n')
- if os.WEXITSTATUS(commands.getstatusoutput('/usr/sbin/useradd -u 240 -g daemon -s /bin/false -d /dev/null -c "distccd" distcc')[0]) == 9:
- os.WEXITSTATUS(commands.getstatusoutput('/usr/sbin/usermod -u 240 -g daemon -s /bin/false -d /dev/null -c "distccd" distcc')[0])
+ if os.WEXITSTATUS(commands.getstatusoutput('/usr/sbin/useradd -g daemon -s /bin/false -d /dev/null -c "distccd" distcc')[0]) == 9:
+ os.WEXITSTATUS(commands.getstatusoutput('/usr/sbin/usermod -g daemon -s /bin/false -d /dev/null -c "distccd" distcc')[0])
foobar = pwd.getpwnam('distcc')
user = foobar[2]