From 71bc1d10f601dab9023c73e207bc787923b4f55c Mon Sep 17 00:00:00 2001 From: Tiago Gomes Date: Thu, 13 Jun 2013 10:40:09 +0000 Subject: 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 --- writeexts.py | 9 +++++---- 1 file 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') -- cgit v1.2.1