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

« back to all changes in this revision

Viewing changes to setup.py

  • Committer: dcoles
  • Date: 2008-02-22 05:59:38 UTC
  • Revision ID: svn-v3-trunk0:2b9c9e99-6f39-0410-b283-7f802c844ae2:trunk:547
settup.py: Added nss libaries and /etc files needed for resolving hostnames.  
Made jail /tmp file world writable

Show diffs side-by-side

added added

removed removed

Lines of Context:
159
159
    '/usr/lib/libXdmcp.so.6',
160
160
    '/lib/libgcc_s.so.1',
161
161
    '/etc/matplotlibrc',
 
162
    # Needed for resolv
 
163
    '/lib/libnss_dns.so.2',
 
164
    #'/lib/libnss_mdns4.so',
 
165
    '/etc/hosts',
 
166
    '/etc/resolv.conf',
 
167
    #'/etc/hosts.conf',
 
168
    #'/etc/hostname',
 
169
    '/etc/nsswitch.conf',
 
170
    '/lib/libnss_files.so.2',
162
171
]
163
172
# Symlinks to make within the jail. Src mapped to dst.
164
173
JAIL_LINKS = {
796
805
    action_mkdir('jail/home', dry)
797
806
    action_mkdir('jail/tmp', dry)
798
807
 
 
808
    # Chmod the tmp directory to world writable
 
809
    action_chmod_w('jail/tmp', dry)
 
810
 
799
811
    # Copy all console and operating system files into the jail
800
812
    action_copylist(install_list.list_scripts, 'jail/opt/ivle', dry)
801
813
    copy_os_files_jail(dry)
1122
1134
        os.chmod(file, stat.S_IXUSR | stat.S_IRUSR | stat.S_IWUSR
1123
1135
            | stat.S_IXGRP | stat.S_IRGRP | stat.S_IXOTH | stat.S_IROTH)
1124
1136
 
 
1137
 
 
1138
def action_chmod_w(file, dry):
 
1139
    """Chmod 777 a file (sets permissions to rwxrwxrwx)."""
 
1140
    print "chmod 777", file
 
1141
    if not dry:
 
1142
        os.chmod(file, stat.S_IXUSR | stat.S_IRUSR | stat.S_IWUSR
 
1143
            | stat.S_IXGRP | stat.S_IWGRP | stat.S_IRGRP | stat.S_IXOTH
 
1144
            | stat.S_IWOTH | stat.S_IROTH)
 
1145
 
1125
1146
def query_user(default, prompt):
1126
1147
    """Prompts the user for a string, which is read from a line of stdin.
1127
1148
    Exits silently if EOF is encountered. Returns the string, with spaces