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 | 221ca74c31a7be787bfa354f53c292f532fa2e2d (patch) | |
tree | d847f394b3157fde9ea8c6c65c8273a63713b14f | |
parent | 72e2d820516ef534c5b557703a973e0499ac398a (diff) | |
download | definitions-221ca74c31a7be787bfa354f53c292f532fa2e2d.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
-rwxr-xr-x | rawdisk.write | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/rawdisk.write b/rawdisk.write index a43a9cce..62d39b31 100755 --- a/rawdisk.write +++ b/rawdisk.write @@ -70,9 +70,17 @@ class RawDiskWriteExtension(morphlib.writeexts.WriteExtension): self.create_run(version_root) + default_path = os.path.join(mp, 'systems', 'default') + if os.path.exists(default_path): + os.remove(default_path) + else: + # we are upgrading and old system that does + # not have an updated extlinux config file + self.install_extlinux(mp) + os.symlink(version_label, default_path) + if self.bootloader_is_wanted(): self.install_kernel(version_root, temp_root) - self.install_extlinux(mp, version_label) self.unmount(mp) |