diff options
author | Pedro Alvarez <pedro.alvarez@codethink.co.uk> | 2014-10-01 08:21:29 +0000 |
---|---|---|
committer | Pedro Alvarez <pedro.alvarez@codethink.co.uk> | 2014-10-01 09:47:04 +0100 |
commit | 4fff47462e598d475e930893383f9c27e6f2c381 (patch) | |
tree | 0f642eead89d8894c313c171e2733db6a0ee7d30 | |
parent | abffc90e8a8150a1279f1d9c9722239e832e7172 (diff) | |
download | definitions-4fff47462e598d475e930893383f9c27e6f2c381.tar.gz |
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.
-rwxr-xr-x | ssh-rsync.write | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/ssh-rsync.write b/ssh-rsync.write index c139b6c0..468e5a1f 100755 --- a/ssh-rsync.write +++ b/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') |