diff options
author | Tiago Gomes <tiago.gomes@codethink.co.uk> | 2013-06-13 10:40:09 +0000 |
---|---|---|
committer | Tiago Gomes <tiago.gomes@codethink.co.uk> | 2013-06-14 09:25:07 +0000 |
commit | 71bc1d10f601dab9023c73e207bc787923b4f55c (patch) | |
tree | b3f8d3d5a1d9aa0fc5d0a1b0cabf813d494636b7 | |
parent | 861ee2270f257d3d5e2a840315b2b5a6f664ae20 (diff) | |
download | definitions-71bc1d10f601dab9023c73e207bc787923b4f55c.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
-rw-r--r-- | writeexts.py | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/writeexts.py b/writeexts.py index df4cec33..de4189f8 100644 --- a/writeexts.py +++ b/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') |