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

« back to all changes in this revision

Viewing changes to bin/ivle-buildjail

  • Committer: David Coles
  • Date: 2009-07-21 02:19:56 UTC
  • mto: (1281.1.8 aufsless)
  • mto: This revision was merged to the branch mainline in revision 1300.
  • Revision ID: coles.david@gmail.com-20090721021956-c1jiwu7fhi2dna1g
Updated to work on bind mounts

Show diffs side-by-side

added added

removed removed

Lines of Context:
43
43
    help='''Apply any package updates in the jail.''')
44
44
parser.add_option("-m", "--mirror",
45
45
    action="store", dest="apt_mirror",
46
 
    help="Sets the apt mirror.", default=conf['jail']['mirror'])
 
46
    help="Sets the apt mirror.", default="http://archive.ubuntu.com/ubuntu")
47
47
parser.add_option("--python-site-packages",
48
48
    action="store", dest="python_site_packages",
49
49
    help="Path to Python site packages directory inside the jail.",
142
142
    print >> sys.stderr, "Jail copying failed."
143
143
    sys.exit(1)
144
144
 
 
145
# Now mangle things a bit, so we can bind-mount the user bits in.
 
146
# /etc/passwd and /etc/ivle/ivle.conf need to be symlinks to somewhere in /home
 
147
 
 
148
os.rename(os.path.join(ivle.conf.jail_system, 'etc/passwd'),
 
149
          os.path.join(ivle.conf.jail_system, 'home/.passwd')
 
150
          )
 
151
os.symlink('../home/.passwd', os.path.join(ivle.conf.jail_system, 'etc/passwd'))
 
152
 
 
153
os.makedirs(os.path.join(ivle.conf.jail_system, "etc/ivle"))
 
154
os.symlink('../../home/.ivle.conf',
 
155
           os.path.join(ivle.conf.jail_system, "etc/ivle/ivle.conf"))