diff options
author | Jonathan Maw <jonathan.maw@codethink.co.uk> | 2013-05-20 16:26:51 +0000 |
---|---|---|
committer | Jonathan Maw <jonathan.maw@codethink.co.uk> | 2013-05-20 17:31:58 +0100 |
commit | b8704752a13472e72730308c83217d6b05b9100b (patch) | |
tree | 3badd4929cdbf588451cf1e34b786f07872646fc /morphlib/exts/nfsboot.write | |
parent | fa71f8b06cbf0199c7bc2aab7090e62a21e3f4b8 (diff) | |
download | morph-b8704752a13472e72730308c83217d6b05b9100b.tar.gz |
nfsboot deployment creates local state dirs
Diffstat (limited to 'morphlib/exts/nfsboot.write')
-rwxr-xr-x | morphlib/exts/nfsboot.write | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/morphlib/exts/nfsboot.write b/morphlib/exts/nfsboot.write index cfc3fc32..61c5306a 100755 --- a/morphlib/exts/nfsboot.write +++ b/morphlib/exts/nfsboot.write @@ -92,6 +92,14 @@ class NFSBootWriteExtension(morphlib.writeexts.WriteExtension): with open(hostnamepath) as f: return f.readline().strip() + def create_local_state(self, location, hostname): + statedir = os.path.join(self._nfsboot_root, hostname, 'state') + subdirs = [os.path.join(statedir, 'home'), + os.path.join(statedir, 'opt'), + os.path.join(statedir, 'srv')] + cliapp.ssh_runcmd('root@%s' % location, + ['mkdir', '-p'] + subdirs) + def copy_kernel(self, temp_root, location, versioned_root, version, hostname): bootdir = os.path.join(temp_root, 'boot') |