summaryrefslogtreecommitdiff
path: root/ssh-rsync.write
diff options
context:
space:
mode:
authorTiago Gomes <tiago.gomes@codethink.co.uk>2013-06-15 15:48:01 +0000
committerTiago Gomes <tiago.gomes@codethink.co.uk>2013-06-17 01:36:32 +0000
commit4f630811332b7ebb21fc47551bccb8e14a456410 (patch)
tree8101ef2c4f0a19b77616f0afef19c6f81f441cb3 /ssh-rsync.write
parentd8a87880248ec754affc302fa8966bf5ebd83046 (diff)
downloaddefinitions-4f630811332b7ebb21fc47551bccb8e14a456410.tar.gz
Run the merge mode of baserock-system-config-sync when upgrading running systems.
Diffstat (limited to 'ssh-rsync.write')
-rwxr-xr-xssh-rsync.write9
1 files changed, 9 insertions, 0 deletions
diff --git a/ssh-rsync.write b/ssh-rsync.write
index b8d30e22..9697e21b 100755
--- a/ssh-rsync.write
+++ b/ssh-rsync.write
@@ -71,6 +71,15 @@ class SshRsyncWriteExtension(morphlib.writeexts.WriteExtension):
cliapp.ssh_runcmd(location, ['btrfs', 'subvolume',
'snapshot', orig_dir, run_dir])
+ self.status(msg='Updating system configuration')
+ bscs_loc = os.path.join(run_dir, 'usr', 'bin',
+ 'baserock-system-config-sync')
+ try:
+ cliapp.ssh_runcmd(location, ['sh', bscs_loc, 'merge',
+ version_label])
+ except:
+ self.status(msg='Updating system configuration failed')
+
self.install_remote_kernel(location, version_root, temp_root)
default_path = os.path.join(remote_mnt, 'systems', 'default')
if self.bootloader_is_wanted():