diff options
author | Sam Thursfield <sam.thursfield@codethink.co.uk> | 2014-03-24 16:32:30 +0000 |
---|---|---|
committer | Sam Thursfield <sam.thursfield@codethink.co.uk> | 2014-03-24 16:32:30 +0000 |
commit | ea57dfc8f8fc94a1f0c2ce64120047a86c7b36bb (patch) | |
tree | 2c8bf65c0bb77406a3496ad31ea517e291de2e10 | |
parent | c7a4b52dc254cbe8b8db28926d3d36f72c4f4197 (diff) | |
parent | 53af2f519658227f28b7a7427c66de6cf426da7a (diff) | |
download | morph-ea57dfc8f8fc94a1f0c2ce64120047a86c7b36bb.tar.gz |
Merge branch 'sam/nfs-deploy-fixes-2'
Reviewed-By: Daniel Silverstone (on IRC)
Reviewed-By: Richard Maw (on IRC)
-rwxr-xr-x | morphlib/exts/nfsboot.check | 7 | ||||
-rwxr-xr-x | morphlib/exts/nfsboot.write | 2 |
2 files changed, 5 insertions, 4 deletions
diff --git a/morphlib/exts/nfsboot.check b/morphlib/exts/nfsboot.check index e240dd72..f84f187f 100755 --- a/morphlib/exts/nfsboot.check +++ b/morphlib/exts/nfsboot.check @@ -80,12 +80,13 @@ class NFSBootCheckExtension(morphlib.writeexts.WriteExtension): 'nfs server by systemd' % server) # TFTP server exports /srv/nfsboot/tftp + tftp_root = os.path.join(self._nfsboot_root, 'tftp') try: cliapp.ssh_runcmd( - 'root@%s' % server, ['test' , '-d', '/srv/nfsboot/tftp']) + 'root@%s' % server, ['test' , '-d', tftp_root]) except cliapp.AppException: - raise cliapp.AppException('server %s does not export ' - '/srv/nfsboot/tftp' % server) + raise cliapp.AppException('server %s does not export %s' % + (tftp_root, server)) def version_exists(self, versioned_root, location): try: diff --git a/morphlib/exts/nfsboot.write b/morphlib/exts/nfsboot.write index 3bb66821..8d3d6df7 100755 --- a/morphlib/exts/nfsboot.write +++ b/morphlib/exts/nfsboot.write @@ -62,7 +62,7 @@ class NFSBootWriteExtension(morphlib.writeexts.WriteExtension): temp_root, location = args version_label = os.getenv('VERSION_LABEL', 'factory') - hostname = os.environ.get('HOSTNAME') + hostname = os.environ['HOSTNAME'] versioned_root = os.path.join(self._nfsboot_root, hostname, 'systems', version_label) |