From 3fbc5d6dc6c190163340ac017d7f2f32dfba6256 Mon Sep 17 00:00:00 2001 From: Markus Nigbur Date: Thu, 11 Dec 2003 15:52:05 +0000 Subject: Fixed distcc-config bug --- sys-devel/distcc/files/2.11.1p/distcc-config | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) (limited to 'sys-devel/distcc/files') 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] -- cgit v1.2.3-65-gdbad