~azzar1/unity/add-show-desktop-key

« back to all changes in this revision

Viewing changes to setup/install.py

  • Committer: William Grant
  • Date: 2008-07-07 04:55:07 UTC
  • mfrom: (unknown (missing))
  • Revision ID: wgrant@ugrad.unimelb.edu.au-20080707045507-wca484wpjxppy7ln
Merge jails-redux branch. We now use aufs rather than hardlinking tens
of thousands of jail files hundreds of times.

Reconfiguration and reconstruction of all jails will be required.
Probably a good idea to start jails from scratch if possible.

Show diffs side-by-side

added added

removed removed

Lines of Context:
40
40
Create target install directory ($target).
41
41
Create $target/bin.
42
42
Copy trampoline/trampoline to $target/bin.
 
43
Copy timount/timount to $target/bin.
43
44
chown and chmod the installed trampoline.
44
45
Copy www/ to $target.
45
 
Copy jail/ to jails __staging__ directory (unless --nojail specified).
 
46
Copy jail/ to jail_system directory (unless --nojail specified).
46
47
Copy subjects/ to subjects directory (unless --nosubjects specified).
47
48
"""
48
49
 
53
54
        help="Print out the actions but don't do anything.")
54
55
    parser.add_option("-J", "--nojail",
55
56
        action="store_true", dest="nojail",
56
 
        help="Don't copy jail/ to jail __staging__ directory")
 
57
        help="Don't copy jail/ to jail_system directory")
57
58
    parser.add_option("-S", "--nosubjects",
58
59
        action="store_true", dest="nosubjects",
59
60
        help="Don't copy subject/ to subjects directory.")
72
73
    # Pull the required varibles out of the config
73
74
    ivle_install_dir = conf.conf.ivle_install_dir
74
75
    jail_base = conf.conf.jail_base
 
76
    jail_system = conf.conf.jail_system
75
77
    subjects_base = conf.conf.subjects_base
76
78
    exercises_base = conf.conf.exercises_base
77
79
 
94
96
    # chown trampoline to root and set setuid bit
95
97
    action_chown_setuid(tramppath, dry)
96
98
 
 
99
    timountpath = os.path.join(ivle_install_dir, 'bin/timount')
 
100
    action_copyfile('timount/timount', timountpath, dry)
 
101
 
97
102
    # Create a scripts directory to put the usrmgt-server in.
98
103
    action_mkdir(os.path.join(ivle_install_dir, 'scripts'), dry)
99
104
    usrmgtpath = os.path.join(ivle_install_dir, 'scripts/usrmgt-server')
114
119
 
115
120
    if not nojail:
116
121
        # Copy the local jail directory built by the build action
117
 
        # to the jails __staging__ directory (it will be used to help build
 
122
        # to the jail_system directory (it will be used to help build
118
123
        # all the students' jails).
119
 
        action_copytree('jail', os.path.join(jail_base, '__staging__'), dry)
 
124
        action_copytree('jail', jail_system, dry)
120
125
    if not nosubjects:
121
126
        # Copy the subjects and exercises directories across
122
127
        action_copylist(install_list.list_subjects, subjects_base, dry,