Permalink
Browse files

Add a clear_history flag to the bundle method. If True, will clear th…

…e bash history before bundling.
  • Loading branch information...
1 parent 962de0f commit 6b23e1552f084207ac5607624c95acdc5ada9e45 Mitch.Garnaat committed Dec 21, 2009
Showing with 3 additions and 1 deletion.
  1. +3 −1 boto/manage/server.py
@@ -86,7 +86,7 @@ def upload_bundle(self, bucket, prefix, ssh_key):
return command
def bundle(self, bucket=None, prefix=None, key_file=None, cert_file=None,
- size=None, ssh_key=None, fp=None):
+ size=None, ssh_key=None, fp=None, clear_history=True):
iobject = IObject()
if not bucket:
bucket = iobject.get_string('Name of S3 bucket')
@@ -105,6 +105,8 @@ def bundle(self, bucket=None, prefix=None, key_file=None, cert_file=None,
fp = StringIO.StringIO()
fp.write('mv %s /mnt/boto.cfg; ' % BotoConfigPath)
fp.write('mv /root/.ssh/authorized_keys /mnt/authorized_keys; ')
+ if clear_history:
+ fp.write('history -c; ')
fp.write(self.bundle_image(prefix, size, ssh_key))
fp.write('; ')
fp.write(self.upload_bundle(bucket, prefix, ssh_key))

0 comments on commit 6b23e15

Please sign in to comment.