Package VMBuilder :: Package plugins :: Package ubuntu :: Module hardy
[frames] | no frames]

Source Code for Module VMBuilder.plugins.ubuntu.hardy

 1  # 
 2  #    Uncomplicated VM Builder 
 3  #    Copyright (C) 2007-2009 Canonical Ltd. 
 4  #     
 5  #    See AUTHORS for list of contributors 
 6  # 
 7  #    This program is free software: you can redistribute it and/or modify 
 8  #    it under the terms of the GNU General Public License version 3, as 
 9  #    published by the Free Software Foundation. 
10  # 
11  #    This program is distributed in the hope that it will be useful, 
12  #    but WITHOUT ANY WARRANTY; without even the implied warranty of 
13  #    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the 
14  #    GNU General Public License for more details. 
15  # 
16  #    You should have received a copy of the GNU General Public License 
17  #    along with this program.  If not, see <http://www.gnu.org/licenses/>. 
18  # 
19  from VMBuilder.plugins.ubuntu.gutsy import Gutsy 
20   
21 -class Hardy(Gutsy):
22 virtio_net = True 23 ec2_kernel_info = { 'i386' : 'aki-6e709707', 'amd64' : 'aki-6f709706' } 24 ec2_ramdisk_info = { 'i386' : 'ari-6c709705', 'amd64' : 'ari-61709708' } 25
26 - def apply_ec2_settings(self):
27 self.context.addpkg += ['ec2-init', 28 'openssh-server', 29 'ec2-modules', 30 'standard^', 31 'ec2-ami-tools', 32 'update-motd'] 33 34 if not self.context.ppa: 35 self.context.ppa = [] 36 37 self.context.ppa += ['ubuntu-on-ec2/ppa']
38
39 - def install_ec2(self):
40 41 if self.context.arch == 'i386': 42 self.run_in_target('apt-get' ,'--force-yes', '-y', 'install', 'libc6-xen') 43 self.run_in_target('apt-get','--purge','--force-yes', '-y', 'remove', 'libc6-i686') 44 self.install_from_template('/etc/ld.so.conf.d/libc6-xen.conf', 'xen-ld-so-conf') 45 self.install_from_template('/etc/event.d/xvc0', 'upstart', { 'console' : 'xvc0' }) 46 self.run_in_target('update-rc.d', '-f', 'hwclockfirst.sh', 'remove') 47 self.install_from_template('/etc/update-motd.d/51_update-motd', '51_update-motd-hardy') 48 self.run_in_target('chmod', '755', '/etc/update-motd.d/51_update-motd') 49 self.install_from_template('/etc/ec2-init/is-compat-env', 'is-compat-env')
50
51 - def xen_kernel_path(self):
52 return '/boot/vmlinuz-2.6.24-19-xen'
53
54 - def xen_ramdisk_path(self):
55 return '/boot/initrd.img-2.6.24-19-xen'
56
58 return True
59