diff options
-rw-r--r-- | morphlib/writeexts.py | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/morphlib/writeexts.py b/morphlib/writeexts.py index 0fd0ad7b..9a6b6a28 100644 --- a/morphlib/writeexts.py +++ b/morphlib/writeexts.py @@ -223,7 +223,7 @@ class WriteExtension(cliapp.Application): def mkfs_btrfs(self, location): '''Create a btrfs filesystem on the disk.''' - self.status(msg='Creating btrfs filesystem') + self.status(msg='Creating btrfs filesystem in %s' % location) cliapp.runcmd(['mkfs.btrfs', '-L', 'baserock', location]) def get_uuid(self, location): @@ -572,3 +572,8 @@ class WriteExtension(cliapp.Application): logging.error("Error checking SSH connectivity: %s", str(e)) raise cliapp.AppException( 'Unable to SSH to %s: %s' % (ssh_host, e)) + def deploying_to_device(self, location): + dev_regex = re.compile("^/dev/((sd|vd|mmcblk|hd)[a-z0-9]+)$") + if dev_regex(location): + return true + return false |