diff options
author | Tiago Gomes <tiago.gomes@codethink.co.uk> | 2013-06-18 16:09:51 +0100 |
---|---|---|
committer | Tiago Gomes <tiago.gomes@codethink.co.uk> | 2013-06-14 21:49:36 +0000 |
commit | 301f27f3b709914729655ac269f014a3137cb035 (patch) | |
tree | bbcc0d0029df78536102bb3277edd74b3a2326f5 /morphlib/exts/ssh-rsync.write | |
parent | 6f48a53c5f97bb291eab5d4857a020ac6ec1d0a9 (diff) | |
download | morph-301f27f3b709914729655ac269f014a3137cb035.tar.gz |
Create a symbolic link to the default system version when upgrading running systems.
Diffstat (limited to 'morphlib/exts/ssh-rsync.write')
-rwxr-xr-x | morphlib/exts/ssh-rsync.write | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/morphlib/exts/ssh-rsync.write b/morphlib/exts/ssh-rsync.write index 6fe1153d..4348714c 100755 --- a/morphlib/exts/ssh-rsync.write +++ b/morphlib/exts/ssh-rsync.write @@ -72,6 +72,10 @@ class SshRsyncWriteExtension(morphlib.writeexts.WriteExtension): 'snapshot', orig_dir, run_dir]) self.install_remote_kernel(location, version_root, temp_root) + default_path = os.path.join(remote_mnt, 'systems', 'default') + cliapp.ssh_runcmd(location, ['ln', '-s', '-f', + version_label, + default_path]) except Exception as e: try: cliapp.ssh_runcmd(location, @@ -103,9 +107,9 @@ class SshRsyncWriteExtension(morphlib.writeexts.WriteExtension): 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') cliapp.ssh_runcmd(location, ['mv', config, config+'~']) |