From 558b7dbfb6a62490e65bb4a4667ab8bf03495f68 Mon Sep 17 00:00:00 2001 From: Pedro Alvarez Date: Wed, 1 Oct 2014 08:21:29 +0000 Subject: ssh-rsync: gett UUID of the disk before writing fstab With this patch, the fstab of the system to be deployed as an upgrade will be conifgured using the UUID of the disk. Now when doing an upgrade is not needed to specify the ROOT_DEVICE. --- morphlib/exts/ssh-rsync.write | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'morphlib/exts') 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') -- cgit v1.2.1