summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPedro Alvarez <pedro.alvarez@codethink.co.uk>2014-10-01 08:21:29 +0000
committerPedro Alvarez <pedro.alvarez@codethink.co.uk>2014-10-01 08:21:29 +0000
commit7805f487e3d4e3c7be0d364eae4c1ce71ac5fc34 (patch)
tree3e4376f2ca473e0e125e95cc6fa17d4df4e71ec4
parentc754d0366d4557910775bfa83c85ffdf98af0610 (diff)
downloadmorph-baserock/pedroalvarez/uuid-upgrades.tar.gz
ssh-rsync: gett UUID of the disk before writing fstabbaserock/pedroalvarez/uuid-upgrades
-rwxr-xr-xmorphlib/exts/ssh-rsync.write7
1 files changed, 5 insertions, 2 deletions
diff --git a/morphlib/exts/ssh-rsync.write b/morphlib/exts/ssh-rsync.write
index c139b6c0..468e5a1f 100755
--- a/morphlib/exts/ssh-rsync.write
+++ b/morphlib/exts/ssh-rsync.write
@@ -54,9 +54,12 @@ class SshRsyncWriteExtension(morphlib.writeexts.WriteExtension):
self.upgrade_remote_system(location, temp_root)
def upgrade_remote_system(self, location, temp_root):
- self.complete_fstab_for_btrfs_layout(temp_root)
-
root_disk = self.find_root_disk(location)
+ uuid = cliapp.ssh_runcmd(location, ['blkid', '-s', 'UUID', '-o',
+ 'value', root_disk]).strip()
+
+ self.complete_fstab_for_btrfs_layout(temp_root, uuid)
+
version_label = os.environ.get('VERSION_LABEL')
autostart = self.get_environment_boolean('AUTOSTART')