summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVishvananda Ishaya <vishvananda@gmail.com>2010-07-02 10:25:56 -0500
committerVishvananda Ishaya <vishvananda@gmail.com>2010-07-02 10:25:56 -0500
commitb85c7f94d64d3617c40d596dd48c7e258c4195a7 (patch)
tree57de8f9be0ac41049bb64d7b17a6a8d9377d8bc9
parent626257d822ecd4e4257a73c96378b21f077c46f8 (diff)
parent543d9792b48909eefe1b3a67e83e0412800c60d7 (diff)
downloadnova-b85c7f94d64d3617c40d596dd48c7e258c4195a7.tar.gz
nova-b85c7f94d64d3617c40d596dd48c7e258c4195a7.tar.xz
nova-b85c7f94d64d3617c40d596dd48c7e258c4195a7.zip
Merge patch 28001
-rw-r--r--nova/compute/disk.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/nova/compute/disk.py b/nova/compute/disk.py
index e7090dad3..bd6a010ee 100644
--- a/nova/compute/disk.py
+++ b/nova/compute/disk.py
@@ -36,7 +36,7 @@ from nova import exception
def partition(infile, outfile, local_bytes=0, local_type='ext2', execute=None):
"""Takes a single partition represented by infile and writes a bootable
drive image into outfile.
-
+
The first 63 sectors (0-62) of the resulting image is a master boot record.
Infile becomes the first primary partition.
If local bytes is specified, a second primary partition is created and
@@ -142,5 +142,5 @@ def _inject_into_fs(key, fs, execute=None):
yield execute('sudo chown root %s' % sshdir)
yield execute('sudo chmod 700 %s' % sshdir)
keyfile = os.path.join(sshdir, 'authorized_keys')
- yield execute('sudo bash -c "cat >> %s"' % keyfile, '\n' + key + '\n')
+ yield execute('sudo tee -a %s' % keyfile, '\n' + key.strip() + '\n')