~lool/vmbuilder/debian-kpartx-output

« back to all changes in this revision

Viewing changes to VMBuilder/plugins/ubuntu/dapper.py

  • Committer: Soren Hansen
  • Date: 2008-10-22 10:52:20 UTC
  • Revision ID: soren@canonical.com-20081022105220-6bg9dt2ys8ptm8v6
Create /var/{run,lock} on root filesystem, so that the appropriate tmpfs's
will be mountable before /var is mounted in the running system. This matches
d-i behaviour.

Don't create /var/run/network anymore.

Show diffs side-by-side

added added

removed removed

Lines of Context:
122
122
        self.install_from_template('/etc/hosts', 'etc_hosts', { 'hostname' : self.vm.hostname, 'domain' : self.vm.domain }) 
123
123
        self.install_from_template('/etc/network/interfaces', 'interfaces')
124
124
 
125
 
        #fix bug lp:276365
126
 
        os.mkdir('%s/var/run/network' % self.destdir, 755)
127
 
 
128
125
    def unprevent_daemons_starting(self):
129
126
        os.unlink('%s/usr/sbin/policy-rc.d' % self.destdir)
130
127
 
208
205
    def run_in_target(self, *args, **kwargs):
209
206
        return run_cmd('chroot', self.destdir, *args, **kwargs)
210
207
 
 
208
    def post_mount(self, fs):
 
209
        if fs.mntpnt == '/':
 
210
            logging.debug("Creating /var/run in root filesystem")
 
211
            os.makedirs('%s/var/run' % fs.mntpath)
 
212
            logging.debug("Creating /var/lock in root filesystem")
 
213
            os.makedirs('%s/var/lock' % fs.mntpath)
 
214