96
103
# Needed by python
104
'/usr/bin/python%s' % PYTHON_VERSION,
105
# Needed by fileservice
106
'/lib/libcom_err.so.2',
107
'/lib/libcrypt.so.1',
108
'/lib/libkeyutils.so.1',
109
'/lib/libresolv.so.2',
112
'/usr/lib/libapr-1.so.0',
113
'/usr/lib/libaprutil-1.so.0',
114
'/usr/lib/libdb-4.4.so',
115
'/usr/lib/libexpat.so.1',
116
'/usr/lib/libgcrypt.so.11',
117
'/usr/lib/libgnutls.so.13',
118
'/usr/lib/libgpg-error.so.0',
119
'/usr/lib/libgssapi_krb5.so.2',
120
'/usr/lib/libk5crypto.so.3',
121
'/usr/lib/libkrb5.so.3',
122
'/usr/lib/libkrb5support.so.0',
123
'/usr/lib/liblber.so.2',
124
'/usr/lib/libldap_r.so.2',
125
'/usr/lib/libneon.so.26',
126
'/usr/lib/libpq.so.5',
127
'/usr/lib/libsasl2.so.2',
128
'/usr/lib/libsqlite3.so.0',
129
'/usr/lib/libsvn_client-1.so.1',
130
'/usr/lib/libsvn_delta-1.so.1',
131
'/usr/lib/libsvn_diff-1.so.1',
132
'/usr/lib/libsvn_fs-1.so.1',
133
'/usr/lib/libsvn_fs_base-1.so.1',
134
'/usr/lib/libsvn_fs_fs-1.so.1',
135
'/usr/lib/libsvn_ra-1.so.1',
136
'/usr/lib/libsvn_ra_dav-1.so.1',
137
'/usr/lib/libsvn_ra_local-1.so.1',
138
'/usr/lib/libsvn_ra_svn-1.so.1',
139
'/usr/lib/libsvn_repos-1.so.1',
140
'/usr/lib/libsvn_subr-1.so.1',
141
'/usr/lib/libsvn_wc-1.so.1',
142
'/usr/lib/libtasn1.so.3',
143
'/usr/lib/libxml2.so.2',
98
144
# Needed by matplotlib
99
145
'/usr/lib/i686/cmov/libssl.so.0.9.8',
100
146
'/usr/lib/i686/cmov/libcrypto.so.0.9.8',
115
161
'/usr/lib/libXdmcp.so.6',
116
162
'/lib/libgcc_s.so.1',
117
163
'/etc/matplotlibrc',
165
'/lib/libnss_dns.so.2',
166
'/lib/libnss_mdns4_minimal.so.2',
171
'/etc/nsswitch.conf',
172
'/lib/libnss_files.so.2',
119
174
# Symlinks to make within the jail. Src mapped to dst.
121
'python2.5': 'jail/usr/bin/python',
176
'python%s' % PYTHON_VERSION: 'jail/usr/bin/python',
123
178
# Trees to copy. Src mapped to dst (these will be passed to action_copytree).
124
179
JAIL_COPYTREES = {
125
'/usr/lib/python2.5': 'jail/usr/lib/python2.5',
180
'/usr/lib/python%s' % PYTHON_VERSION:
181
'jail/usr/lib/python%s' % PYTHON_VERSION,
126
182
'/usr/share/matplotlib': 'jail/usr/share/matplotlib',
127
183
'/etc/ld.so.conf.d': 'jail/etc/ld.so.conf.d',
184
'/usr/share/nltk': 'jail/usr/share/nltk',
188
"""A configuration option; one of the things written to conf.py."""
189
def __init__(self, option_name, default, prompt, comment):
190
"""Creates a configuration option.
191
option_name: Name of the variable in conf.py. Also name of the
192
command-line argument to setup.py conf.
193
default: Default value for this variable.
194
prompt: (Short) string presented during the interactive prompt in
196
comment: (Long) comment string stored in conf.py. Each line of this
197
string should begin with a '#'.
199
self.option_name = option_name
200
self.default = default
202
self.comment = comment
204
# Configuration options, defaults and descriptions
206
config_options.append(ConfigOption("root_dir", "/",
207
"""Root directory where IVLE is located (in URL space):""",
209
# In URL space, where in the site is IVLE located. (All URLs will be prefixed
211
# eg. "/" or "/ivle"."""))
212
config_options.append(ConfigOption("ivle_install_dir", "/opt/ivle",
213
'Root directory where IVLE will be installed (on the local file '
216
# In the local file system, where IVLE is actually installed.
217
# This directory should contain the "www" and "bin" directories."""))
218
config_options.append(ConfigOption("jail_base", "/home/informatics/jails",
219
"""Location of Directories
220
=======================
221
Root directory where the jails (containing user files) are stored
222
(on the local file system):""",
224
# In the local file system, where are the student/user file spaces located.
225
# The user jails are expected to be located immediately in subdirectories of
226
# this location."""))
227
config_options.append(ConfigOption("subjects_base",
228
"/home/informatics/subjects",
229
"""Root directory where the subject directories (containing worksheets
230
and other per-subject files) are stored (on the local file system):""",
232
# In the local file system, where are the per-subject file spaces located.
233
# The individual subject directories are expected to be located immediately
234
# in subdirectories of this location."""))
235
config_options.append(ConfigOption("exercises_base",
236
"/home/informatics/exercises",
237
"""Root directory where the exercise directories (containing
238
subject-independent exercise sheets) are stored (on the local file
241
# In the local file system, where are the subject-independent exercise sheet
242
# file spaces located."""))
243
config_options.append(ConfigOption("tos_path",
244
"/home/informatics/tos.html",
245
"""Location where the Terms of Service document is stored (on the local
248
# In the local file system, where is the Terms of Service document located."""))
249
config_options.append(ConfigOption("motd_path",
250
"/home/informatics/motd.html",
251
"""Location where the Message of the Day document is stored (on the local
254
# In the local file system, where is the Message of the Day document
255
# located. This is an HTML file (just the body fragment), which will
256
# be displayed on the login page. It is optional."""))
257
config_options.append(ConfigOption("public_host", "public.localhost",
258
"""Hostname which will cause the server to go into "public mode",
259
providing login-free access to student's published work:""",
261
# The server goes into "public mode" if the browser sends a request with this
262
# host. This is for security reasons - we only serve public student files on a
263
# separate domain to the main IVLE site.
264
# Public mode does not use cookies, and serves only public content.
265
# Private mode (normal mode) requires login, and only serves files relevant to
266
# the logged-in user."""))
267
config_options.append(ConfigOption("allowed_uids", "33",
268
"""UID of the web server process which will run IVLE.
269
Only this user may execute the trampoline. May specify multiple users as
270
a comma-separated list.
273
# The User-ID of the web server process which will run IVLE, and any other
274
# users who are allowed to run the trampoline. This is stores as a string of
275
# comma-separated integers, simply because it is not used within Python, only
276
# used by the setup program to write to conf.h (see setup.py config)."""))
277
config_options.append(ConfigOption("db_host", "localhost",
278
"""PostgreSQL Database config
279
==========================
280
Hostname of the DB server:""",
282
### PostgreSQL Database config ###
283
# Database server hostname"""))
284
config_options.append(ConfigOption("db_port", "5432",
285
"""Port of the DB server:""",
287
# Database server port"""))
288
config_options.append(ConfigOption("db_dbname", "ivle",
289
"""Database name:""",
292
config_options.append(ConfigOption("db_forumdbname", "ivle_forum",
293
"""Forum Database name:""",
295
# Forum Database name"""))
296
config_options.append(ConfigOption("db_user", "postgres",
297
"""Username for DB server login:""",
299
# Database username"""))
300
config_options.append(ConfigOption("db_password", "",
301
"""Password for DB server login:
302
(Caution: This password is stored in plaintext in lib/conf/conf.py)""",
304
# Database password"""))
305
config_options.append(ConfigOption("auth_modules", "ldap_auth",
306
"""Authentication config
307
=====================
308
Comma-separated list of authentication modules. Only "ldap" is available
311
# Comma-separated list of authentication modules.
312
# These refer to importable Python modules in the www/auth directory.
313
# Modules "ldap" and "guest" are available in the source tree, but
314
# other modules may be plugged in to auth against organisation-specific
315
# auth backends."""))
316
config_options.append(ConfigOption("ldap_url", "ldaps://www.example.com",
317
"""(LDAP options are only relevant if "ldap" is included in the list of
319
URL for LDAP authentication server:""",
321
# URL for LDAP authentication server"""))
322
config_options.append(ConfigOption("ldap_format_string",
323
"uid=%s,ou=users,o=example",
324
"""Format string for LDAP auth request:
325
(Must contain a single "%s" for the user's login name)""",
327
# Format string for LDAP auth request
328
# (Must contain a single "%s" for the user's login name)"""))
329
config_options.append(ConfigOption("svn_addr", "http://svn.localhost/",
332
The base url for accessing subversion repositories:""",
334
# The base url for accessing subversion repositories."""))
335
config_options.append(ConfigOption("svn_conf", "/opt/ivle/svn/svn.conf",
336
"""The location of the subversion configuration file used by apache
337
to host the user repositories:""",
339
# The location of the subversion configuration file used by
340
# apache to host the user repositories."""))
341
config_options.append(ConfigOption("svn_repo_path", "/home/informatics/repositories",
342
"""The root directory for the subversion repositories:""",
344
# The root directory for the subversion repositories."""))
345
config_options.append(ConfigOption("svn_auth_ivle", "/opt/ivle/svn/ivle.auth",
346
"""The location of the password file used to authenticate users
347
of the subversion repository from the ivle server:""",
349
# The location of the password file used to authenticate users
350
# of the subversion repository from the ivle server."""))
351
config_options.append(ConfigOption("svn_auth_local", "/opt/ivle/svn/local.auth",
352
"""The location of the password file used to authenticate local users
353
of the subversion repository:""",
355
# The location of the password file used to authenticate local users
356
# of the subversion repository."""))
357
config_options.append(ConfigOption("usrmgt_host", "localhost",
358
"""User Management Server config
359
============================
360
The hostname where the usrmgt-server runs:""",
362
# The hostname where the usrmgt-server runs."""))
363
config_options.append(ConfigOption("usrmgt_port", "2178",
364
"""The port where the usrmgt-server runs:""",
366
# The port where the usrmgt-server runs."""))
367
config_options.append(ConfigOption("usrmgt_magic", "",
368
"""The password for the usrmgt-server:""",
370
# The password for the usrmgt-server."""))
130
372
# Try importing existing conf, but if we can't just set up defaults
131
373
# The reason for this is that these settings are used by other phases
132
374
# of setup besides conf, so we need to know them.
133
375
# Also this allows you to hit Return to accept the existing value.
135
confmodule = __import__("www/conf/conf")
137
root_dir = confmodule.root_dir
141
ivle_install_dir = confmodule.ivle_install_dir
143
ivle_install_dir = "/opt/ivle"
145
public_host = confmodule.public_host
147
public_host = "public.localhost"
149
jail_base = confmodule.jail_base
151
jail_base = "/home/informatics/jails"
153
subjects_base = confmodule.subjects_base
155
subjects_base = "/home/informatics/subjects"
377
confmodule = __import__("lib/conf/conf")
378
for opt in config_options:
380
globals()[opt.option_name] = confmodule.__dict__[opt.option_name]
382
globals()[opt.option_name] = opt.default
156
383
except ImportError:
157
384
# Just set reasonable defaults
159
ivle_install_dir = "/opt/ivle"
160
public_host = "public.localhost"
161
jail_base = "/home/informatics/jails"
162
subjects_base = "/home/informatics/subjects"
385
for opt in config_options:
386
globals()[opt.option_name] = opt.default
166
388
# Try importing install_list, but don't fail if we can't, because listmake can
167
389
# function without it.
412
662
print """This tool will create the following files:
415
668
prompting you for details about your configuration. The file will be
416
669
overwritten if it already exists. It will *not* install or deploy IVLE.
418
671
Please hit Ctrl+C now if you do not wish to do this.
419
""" % (conffile, conf_hfile)
672
""" % (conffile, jailconffile, conf_hfile, phpBBconffile, usrmgtserver_initdfile)
421
674
# Get information from the administrator
422
675
# If EOF is encountered at any time during the questioning, just exit
425
root_dir = query_user(root_dir,
426
"""Root directory where IVLE is located (in URL space):""")
427
ivle_install_dir = query_user(ivle_install_dir,
428
'Root directory where IVLE will be installed (on the local file '
430
jail_base = query_user(jail_base,
431
"""Root directory where the jails (containing user files) are stored
432
(on the local file system):""")
433
subjects_base = query_user(subjects_base,
434
"""Root directory where the subject directories (containing worksheets
435
and other per-subject files) are stored (on the local file system):""")
436
public_host = query_user(public_host,
437
"""Hostname which will cause the server to go into "public mode",
438
providing login-free access to student's published work:""")
439
allowed_uids = query_user(allowed_uids,
440
"""UID of the web server process which will run IVLE.
441
Only this user may execute the trampoline. May specify multiple users as
442
a comma-separated list.
678
for opt in config_options:
679
globals()[opt.option_name] = \
680
query_user(globals()[opt.option_name], opt.prompt)
446
682
opts = dict(opts)
447
683
# Non-interactive mode. Parse the options.
448
if '--root_dir' in opts:
449
root_dir = opts['--root_dir']
450
if '--ivle_install_dir' in opts:
451
ivle_install_dir = opts['--ivle_install_dir']
452
if '--jail_base' in opts:
453
jail_base = opts['--jail_base']
454
if '--subjects_base' in opts:
455
jail_base = opts['--subjects_base']
456
if '--public_host' in opts:
457
public_host = opts['--public_host']
458
if '--allowed_uids' in opts:
459
allowed_uids = opts['--allowed_uids']
684
for opt in config_options:
685
if '--' + opt.option_name in opts:
686
globals()[opt.option_name] = opts['--' + opt.option_name]
461
688
# Error handling on input values
463
allowed_uids = map(int, allowed_uids.split(','))
690
allowed_uids_list = map(int, allowed_uids.split(','))
464
691
except ValueError:
465
692
print >>sys.stderr, (
466
693
"Invalid UID list (%s).\n"
467
694
"Must be a comma-separated list of integers." % allowed_uids)
470
# Write www/conf/conf.py
697
db_port = int(db_port)
698
if db_port < 0 or db_port >= 65536: raise ValueError()
700
print >>sys.stderr, (
701
"Invalid DB port (%s).\n"
702
"Must be an integer between 0 and 65535." % repr(db_port))
705
usrmgt_port = int(usrmgt_port)
706
if usrmgt_port < 0 or usrmgt_port >= 65536: raise ValueError()
708
print >>sys.stderr, (
709
"Invalid user management port (%s).\n"
710
"Must be an integer between 0 and 65535." % repr(usrmgt_port))
713
# Generate the forum secret
714
forum_secret = hashlib.md5(uuid.uuid4().bytes).hexdigest()
716
# Write lib/conf/conf.py
473
719
conf = open(conffile, "w")
477
723
# Miscellaneous application settings
726
for opt in config_options:
727
conf.write('%s\n%s = %s\n' % (opt.comment, opt.option_name,
728
repr(globals()[opt.option_name])))
730
# Add the forum secret to the config file (regenerated each config)
731
conf.write('forum_secret = "%s"\n' % (forum_secret))
734
except IOError, (errno, strerror):
735
print "IO error(%s): %s" % (errno, strerror)
738
print "Successfully wrote lib/conf/conf.py"
740
# Write conf/jailconf.py
743
conf = open(jailconffile, "w")
745
# In the "in-jail" version of conf, we don't need MOST of the details
746
# (it would be a security risk to have them here).
747
# So we just write root_dir, and jail_base is "/".
748
# (jail_base being "/" means "jail-relative" paths are relative to "/"
749
# when inside the jail.)
750
conf.write("""# IVLE Configuration File
752
# Miscellaneous application settings
753
# (User jail version)
480
756
# In URL space, where in the site is IVLE located. (All URLs will be prefixed
482
758
# eg. "/" or "/ivle".
485
# In the local file system, where IVLE is actually installed.
486
# This directory should contain the "www" and "bin" directories.
487
ivle_install_dir = "%s"
489
# The server goes into "public mode" if the browser sends a request with this
490
# host. This is for security reasons - we only serve public student files on a
491
# separate domain to the main IVLE site.
492
# Public mode does not use cookies, and serves only public content.
493
# Private mode (normal mode) requires login, and only serves files relevant to
494
# the logged-in user.
497
761
# In the local file system, where are the student/user file spaces located.
498
762
# The user jails are expected to be located immediately in subdirectories of
502
# In the local file system, where are the per-subject file spaces located.
503
# The individual subject directories are expected to be located immediately
504
# in subdirectories of this location.
506
""" % (root_dir, ivle_install_dir, public_host, jail_base, subjects_base))
766
# The hostname for serving publicly accessible pages
768
""" % (repr(root_dir),repr(public_host)))
509
771
except IOError, (errno, strerror):
510
772
print "IO error(%s): %s" % (errno, strerror)
513
print "Successfully wrote www/conf/conf.py"
775
print "Successfully wrote lib/conf/jailconf.py"
515
777
# Write trampoline/conf.h
545
810
print "Successfully wrote trampoline/conf.h"
812
# Write www/php/phpBB3/config.php
815
conf = open(phpBBconffile, "w")
818
if db_host == 'localhost':
819
forumdb_host = '127.0.0.1'
821
forumdb_host = db_host
824
// phpBB 3.0.x auto-generated configuration file
825
// Do not change anything in this file!
827
$dbhost = '""" + forumdb_host + """';
828
$dbport = '""" + str(db_port) + """';
829
$dbname = '""" + db_forumdbname + """';
830
$dbuser = '""" + db_user + """';
831
$dbpasswd = '""" + db_password + """';
833
$table_prefix = 'phpbb_';
835
$load_extensions = '';
836
@define('PHPBB_INSTALLED', true);
837
// @define('DEBUG', true);
838
//@define('DEBUG_EXTRA', true);
840
$forum_secret = '""" + forum_secret +"""';
844
except IOError, (errno, strerror):
845
print "IO error(%s): %s" % (errno, strerror)
848
print "Successfully wrote www/php/phpBB3/config.php"
850
# Write lib/conf/usrmgt-server.init
853
conf = open(usrmgtserver_initdfile, "w")
855
conf.write( '''#! /bin/sh
857
# Works for Ubuntu. Check before using on other distributions
860
# Provides: usrmgt-server
861
# Required-Start: $syslog $networking $urandom
862
# Required-Stop: $syslog
863
# Default-Start: 2 3 4 5
865
# Short-Description: IVLE user management server
866
# Description: Daemon connecting to the IVLE user management database.
869
PATH=/sbin:/bin:/usr/sbin:/usr/bin
870
DESC="IVLE user management server"
872
DAEMON=/opt/ivle/scripts/$NAME
873
DAEMON_ARGS="''' + str(usrmgt_port) + ''' ''' + usrmgt_magic + '''"
874
PIDFILE=/var/run/$NAME.pid
875
SCRIPTNAME=/etc/init.d/usrmgt-server
877
# Exit if the daemon does not exist
878
test -f $DAEMON || exit 0
880
# Load the VERBOSE setting and other rcS variables
881
[ -f /etc/default/rcS ] && . /etc/default/rcS
883
# Define LSB log_* functions.
884
# Depend on lsb-base (>= 3.0-6) to ensure that this file is present.
885
. /lib/lsb/init-functions
888
# Function that starts the daemon/service
893
# 0 if daemon has been started
894
# 1 if daemon was already running
895
# 2 if daemon could not be started
896
start-stop-daemon --start --quiet --pidfile $PIDFILE --exec $DAEMON --test > /dev/null \
898
start-stop-daemon --start --quiet --pidfile $PIDFILE --exec $DAEMON -- \
901
# Add code here, if necessary, that waits for the process to be ready
902
# to handle requests from services started subsequently which depend
903
# on this one. As a last resort, sleep for some time.
907
# Function that stops the daemon/service
912
# 0 if daemon has been stopped
913
# 1 if daemon was already stopped
914
# 2 if daemon could not be stopped
915
# other if a failure occurred
916
start-stop-daemon --stop --quiet --retry=TERM/30/KILL/5 --pidfile $PIDFILE --name $NAME
918
[ "$RETVAL" = 2 ] && return 2
919
# Wait for children to finish too if this is a daemon that forks
920
# and if the daemon is only ever run from this initscript.
921
# If the above conditions are not satisfied then add some other code
922
# that waits for the process to drop all resources that could be
923
# needed by services started subsequently. A last resort is to
924
# sleep for some time.
925
start-stop-daemon --stop --quiet --oknodo --retry=0/30/KILL/5 --exec $DAEMON
926
[ "$?" = 2 ] && return 2
927
# Many daemons don't delete their pidfiles when they exit.
933
# Function that sends a SIGHUP to the daemon/service
937
# If the daemon can reload its configuration without
938
# restarting (for example, when it is sent a SIGHUP),
939
# then implement that here.
941
start-stop-daemon --stop --signal 1 --quiet --pidfile $PIDFILE --name $NAME
947
[ "$VERBOSE" != no ] && log_daemon_msg "Starting $DESC" "$NAME"
950
0|1) [ "$VERBOSE" != no ] && log_end_msg 0 ;;
951
2) [ "$VERBOSE" != no ] && log_end_msg 1 ;;
955
[ "$VERBOSE" != no ] && log_daemon_msg "Stopping $DESC" "$NAME"
958
0|1) [ "$VERBOSE" != no ] && log_end_msg 0 ;;
959
2) [ "$VERBOSE" != no ] && log_end_msg 1 ;;
962
#reload|force-reload)
964
# If do_reload() is not implemented then leave this commented out
965
# and leave 'force-reload' as an alias for 'restart'.
967
#log_daemon_msg "Reloading $DESC" "$NAME"
971
restart|force-reload)
973
# If the "reload" option is implemented then remove the
974
# 'force-reload' alias
976
log_daemon_msg "Restarting $DESC" "$NAME"
983
1) log_end_msg 1 ;; # Old process is still running
984
*) log_end_msg 1 ;; # Failed to start
994
#echo "Usage: $SCRIPTNAME {start|stop|restart|reload|force-reload}" >&2
995
echo "Usage: $SCRIPTNAME {start|stop|restart|force-reload}" >&2
1004
except IOError, (errno, strerror):
1005
print "IO error(%s): %s" % (errno, strerror)
1008
# fix permissions as the file contains the database password
1010
os.chmod('doc/setup/usrmgt-server.init', 0600)
1011
except OSError, (errno, strerror):
1012
print "WARNING: Couldn't chmod doc/setup/usrmgt-server.init:"
1013
print "OS error(%s): %s" % (errno, strerror)
1015
print "Successfully wrote lib/conf/usrmgt-server.init"
548
1018
print "You may modify the configuration at any time by editing"
550
1021
print conf_hfile
1023
print usrmgtserver_initdfile
625
1127
# chown trampoline to root and set setuid bit
626
1128
action_chown_setuid(tramppath, dry)
628
# Copy the www directory using the list
1130
# Create a scripts directory to put the usrmgt-server in.
1131
action_mkdir(os.path.join(ivle_install_dir, 'scripts'), dry)
1132
usrmgtpath = os.path.join(ivle_install_dir, 'scripts/usrmgt-server')
1133
action_copyfile('scripts/usrmgt-server', usrmgtpath, dry)
1134
action_chmod_x(usrmgtpath, dry)
1136
# Copy the www and lib directories using the list
629
1137
action_copylist(install_list.list_www, ivle_install_dir, dry)
1138
action_copylist(install_list.list_lib, ivle_install_dir, dry)
1140
# Copy the php directory
1141
forum_dir = "www/php/phpBB3"
1142
forum_path = os.path.join(ivle_install_dir, forum_dir)
1143
action_copytree(forum_dir, forum_path, dry)
1144
print "chown -R www-data:www-data %s" % forum_path
1146
os.system("chown -R www-data:www-data %s" % forum_path)
632
1149
# Copy the local jail directory built by the build action
633
1150
# to the jails template directory (it will be used as a template
634
1151
# for all the students' jails).
635
1152
action_copytree('jail', os.path.join(jail_base, 'template'), dry)
1154
# Copy the subjects and exercises directories across
1155
action_copylist(install_list.list_subjects, subjects_base, dry,
1156
srcdir="./subjects")
1157
action_copylist(install_list.list_exercises, exercises_base, dry,
1158
srcdir="./exercises")
637
1160
# Append IVLE path to ivle.pth in python site packages
638
1161
# (Unless it's already there)
639
1162
ivle_pth = os.path.join(sys.prefix,
640
"lib/python2.5/site-packages/ivle.pth")
1163
"lib/python%s/site-packages/ivle.pth" % PYTHON_VERSION)
641
1164
ivle_www = os.path.join(ivle_install_dir, "www")
1165
ivle_lib = os.path.join(ivle_install_dir, "lib")
642
1166
write_ivle_pth = True
1167
write_ivle_lib_pth = True
644
1169
file = open(ivle_pth, 'r')
645
1170
for line in file:
646
1171
if line.strip() == ivle_www:
647
1172
write_ivle_pth = False
1173
elif line.strip() == ivle_lib:
1174
write_ivle_lib_pth = False
649
1176
except (IOError, OSError):
651
1178
if write_ivle_pth:
652
1179
action_append(ivle_pth, ivle_www)
1180
if write_ivle_lib_pth:
1181
action_append(ivle_pth, ivle_lib)