summaryrefslogtreecommitdiff
path: root/morphlib/exts
diff options
context:
space:
mode:
authorTiago Gomes <tiago.gomes@codethink.co.uk>2013-06-17 14:56:05 +0100
committerTiago Gomes <tiago.gomes@codethink.co.uk>2013-06-17 14:56:05 +0100
commit251fff1bb9d558e8f4b55fba5d1d88b42a685389 (patch)
tree59d2cb0cd4b65f88bbd16fa464824ecee75f1a69 /morphlib/exts
parentb9052e9eceb6a4e56e68ec324ccaa5d493116cc7 (diff)
parentd02d3551d78753da10a4ab0b644163ea2fdcea85 (diff)
downloadmorph-251fff1bb9d558e8f4b55fba5d1d88b42a685389.tar.gz
Merge branch 'baserock/tiagogomes/default-symlink' of git://git.baserock.org/baserock/baserock/morph
Reviewed by Richard Maw and Lars Wirzenius
Diffstat (limited to 'morphlib/exts')
-rwxr-xr-xmorphlib/exts/rawdisk.write10
1 files changed, 9 insertions, 1 deletions
diff --git a/morphlib/exts/rawdisk.write b/morphlib/exts/rawdisk.write
index a43a9cce..62d39b31 100755
--- a/morphlib/exts/rawdisk.write
+++ b/morphlib/exts/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)