[ubuntu-cloud] default /home/ubuntu/.bashrc

Edward Frye ubuntu at edwardfrye.com
Tue Jan 31 21:40:24 UTC 2012

I'm not very familiar with the Chef-Solo app, but the bashrc entry is
if the prompt $PS1 is empty/not set, then don't load the rest of the

If you're not using an interactive bash shell, don't load the interactive
bash parameters
such as your history, aliases, color prompts, etc.

This would be for things like cron, startup scripts, etc. that use /bin/bash

If you're trying to set environment variables for all users, you can create
a new configuration file
in the /etc/profile.d/ directory with the parameters you want those users
to have which is loaded
before the /etc/bash.bashrc or the ~/.bashrc

Hope this helps

On Tue, Jan 31, 2012 at 11:42 AM, Hedge Hog <hedgehogshiatus at gmail.com>wrote:

> Hi,
> In the current AMI's at cloud.ubuntu.com (search:lucid 64 ebs) the
> default bashrc has:
>   [ -z "$PS1" ] && return
> Which of course means that it is not trivial to append to the .bashrc
> Naturally this default setting is sensible for people logged in, and
> interactive cloud instances are an important use case.
> However,  but since these amis are the same as at[0], whose url
> suggests server use acses, I wonder if it isn't reasonable to have the
> default bashrc without this early return?
> For the record I'm trying to get the AMI to the point where I install
> Chef-solo, with the particular ruby install I need, and then can hand
> off all these sorts of issues to chef-solo.
> Have I missed a trick, or some AMI that doesn't have this behavior as
> default?
> I'd be interested in hearing how others handle this.
> Best wishes
> --
> πόλλ' οἶδ ἀλώπηξ, ἀλλ' ἐχῖνος ἓν μέγα
> [The fox knows many things, but the hedgehog knows one big thing.]
>   Archilochus, Greek poet (c. 680 BC – c. 645 BC)
> http://hedgehogshiatus.com
> --
> Ubuntu-cloud mailing list
> Ubuntu-cloud at lists.ubuntu.com
> Modify settings or unsubscribe at:
> https://lists.ubuntu.com/mailman/listinfo/ubuntu-cloud
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ubuntu.com/archives/ubuntu-cloud/attachments/20120131/0073fce7/attachment.html>

More information about the Ubuntu-cloud mailing list