[Zope-Checkins] CVS: Zope/inst - make_start.py:1.10.8.1
Chris McDonough
chrism@zope.com
Fri, 27 Sep 2002 01:30:18 -0400
Update of /cvs-repository/Zope/inst
In directory cvs.zope.org:/tmp/cvs-serv29085
Modified Files:
Tag: Zope-2_6-branch
make_start.py
Log Message:
- Collector #586: Generated 'start' scripts had a nonsensical
export of an "INST_HOME" environment variable.
=== Zope/inst/make_start.py 1.10 => 1.10.8.1 ===
--- Zope/inst/make_start.py:1.10 Wed Aug 14 17:17:32 2002
+++ Zope/inst/make_start.py Fri Sep 27 01:30:18 2002
@@ -14,19 +14,13 @@
import sys, os
from do import *
-# Using PYTHONHOME is bad under Python 2.0
-if sys.version[:1]=='2':
- varname='INST_HOME'
-else:
- varname='PYTHONHOME'
-
def sh(home, user, group):
start=os.path.join(home, 'start')
if not os.path.exists(start):
print '-'*78
print 'Creating start script, start'
f = open(start,'w')
- f.write(START_SCRIPT % (varname, varname, sys.executable, varname))
+ f.write(START_SCRIPT % sys.executable)
ch(start,user,group,0711)
f.close()
@@ -42,6 +36,7 @@
START_SCRIPT="""#!/bin/sh
umask 077
reldir=`dirname $0`
+cwd=`cd $reldir; pwd`
# Zope's event logger is controlled by the "EVENT_LOG_FILE" environment
# variable. If you don't have a "EVENT_LOG_FILE" environment variable
# (or its older alias "STUPID_LOG_FILE") set, Zope will log to the standard
@@ -54,9 +49,7 @@
EVENT_LOG_FILE=""
export EVENT_LOG_FILE
fi
-%s=`cd $reldir; pwd`
-export %s
-exec %s $%s/z2.py -D "$@"
+exec %s $cwd/z2.py -D "$@"
"""
STOP_SCRIPT="#! /bin/sh\nkill `cat %s`\n"