summaryrefslogtreecommitdiff
path: root/morphlib/writeexts.py
diff options
context:
space:
mode:
authorTiago Gomes <tiago.gomes@codethink.co.uk>2013-06-13 10:40:09 +0000
committerTiago Gomes <tiago.gomes@codethink.co.uk>2013-06-14 09:25:07 +0000
commitd02d3551d78753da10a4ab0b644163ea2fdcea85 (patch)
treec277392f5bc2ae5932729f1fbb21bd87bbc30eb6 /morphlib/writeexts.py
parent5baf11496d4f84fa54ec5ff2a5d5464caaaf1492 (diff)
downloadmorph-d02d3551d78753da10a4ab0b644163ea2fdcea85.tar.gz
Set up a symlink to the default system version in rawdisk/kvm/vbox
deployments Also Change them to use the "default" symlink in the extlinux.conf they create, instead of hardcoding the current system version name
Diffstat (limited to 'morphlib/writeexts.py')
-rw-r--r--morphlib/writeexts.py9
1 files changed, 5 insertions, 4 deletions
diff --git a/morphlib/writeexts.py b/morphlib/writeexts.py
index df4cec33..de4189f8 100644
--- a/morphlib/writeexts.py
+++ b/morphlib/writeexts.py
@@ -71,9 +71,10 @@ class WriteExtension(cliapp.Application):
self.create_orig(version_root, temp_root)
self.create_fstab(version_root)
self.create_run(version_root)
+ os.symlink(version_label, os.path.join(mp, 'systems', 'default'))
if self.bootloader_is_wanted():
self.install_kernel(version_root, temp_root)
- self.install_extlinux(mp, version_label)
+ self.install_extlinux(mp)
except BaseException, e:
sys.stderr.write('Error creating disk image')
self.unmount(mp)
@@ -226,7 +227,7 @@ class WriteExtension(cliapp.Application):
cliapp.runcmd(['cp', '-a', try_path, kernel_dest])
break
- def install_extlinux(self, real_root, version_label):
+ def install_extlinux(self, real_root):
'''Install extlinux on the newly created disk image.'''
self.status(msg='Creating extlinux.conf')
@@ -235,9 +236,9 @@ class WriteExtension(cliapp.Application):
f.write('default linux\n')
f.write('timeout 1\n')
f.write('label linux\n')
- f.write('kernel /systems/' + version_label + '/kernel\n')
+ f.write('kernel /systems/default/kernel\n')
f.write('append root=/dev/sda '
- 'rootflags=subvol=systems/' + version_label + '/run '
+ 'rootflags=subvol=systems/default/run '
'init=/sbin/init rw\n')
self.status(msg='Installing extlinux')