Removed alias stuff, now done in tools/os-euca.sh

This commit is contained in:
Joshua Harlow 2012-03-13 12:56:36 -07:00
parent bdcca74d74
commit 9d47499dbf
2 changed files with 4 additions and 9 deletions

View File

@ -173,11 +173,6 @@ class RcWriter(object):
def _generate_aliases(self):
lines = list()
lines.append('# Alias stuff')
export_inc = """
alias ec2-bundle-image="ec2-bundle-image --cert ${EC2_CERT} --privatekey ${EC2_PRIVATE_KEY} --user ${EC2_USER_ID} --ec2cert ${NOVA_CERT}"
alias ec2-upload-bundle="ec2-upload-bundle -a ${EC2_ACCESS_KEY} -s ${EC2_SECRET_KEY} --url ${S3_URL} --ec2cert ${NOVA_CERT}"
"""
lines.append(export_inc.strip())
lines.append("")
return lines

View File

@ -281,7 +281,7 @@ def _explode_form_path(path):
def in_terminal(check_both=False):
if check_both:
return sys.stdout.isatty() or sys.stderr.isatty()
return sys.stdout.isatty() and sys.stderr.isatty()
else:
return sys.stdout.isatty()
@ -329,7 +329,7 @@ def mkdirslist(path):
def append_file(fn, text, flush=True, quiet=False):
if not quiet:
LOG.audit("Appending to file %s (%d bytes) (%s)", fn, len(text), flush)
LOG.audit("Appending to file %s (%d bytes) (flush=%s)", fn, len(text), flush)
LOG.audit(">> %s" % (text))
if not DRYRUN_MODE:
with open(fn, "a") as f:
@ -341,7 +341,7 @@ def append_file(fn, text, flush=True, quiet=False):
def write_file(fn, text, flush=True, quiet=False):
if not quiet:
LOG.audit("Writing to file %s (%d bytes)", fn, len(text))
LOG.audit("Writing to file %s (%d bytes) (flush=%s)", fn, len(text), flush)
LOG.audit("> %s" % (text))
if not DRYRUN_MODE:
with open(fn, "w") as f:
@ -354,7 +354,7 @@ def write_file(fn, text, flush=True, quiet=False):
def touch_file(fn, die_if_there=True, quiet=False, file_size=0):
if not isfile(fn):
if not quiet:
LOG.audit("Touching and truncating file %s (%s)", fn, file_size)
LOG.audit("Touching and truncating file %s (truncate size=%s)", fn, file_size)
if not DRYRUN_MODE:
with open(fn, "w") as f:
f.truncate(file_size)