[chef] Re: Re: Not able to execute .profile in ubuntu through chef recipe


Chronological Thread 
  • From: Amandeep < >
  • To: " " < >
  • Subject: [chef] Re: Re: Not able to execute .profile in ubuntu through chef recipe
  • Date: Tue, 16 Dec 2014 16:22:17 +0530

Thanks Morgan. I am writing my own cookbook currently  where i am setting java home and path variable in .profile as well as /etc/profile file so that when these files are executed then automatically env variables will be set.

Regards
Amandeep Singh

Sent from my iPhone

On 16-Dec-2014, at 3:40 pm, Morgan Blackthorne < "> > wrote:

You don't execute .profile. If you're in a shell and need to reload the file you can do ", ~/.profile" but that is a shell built-in, it's not a command. Typically commands without a TTY won't load the .profile/etc files, unless the command is a shell script or you explicitly call the shell to run the command.

If you're having trouble running scripts via Chef, you'll need to paste at least the error that occurs for us to help.

Also, why not just use the existing community java cookbook (https://github.com/agileorbit-cookbooks/java)? ISTR that has settings to configure JAVA_HOME via an /etc/profile.d file.

--
~*~ StormeRider ~*~

"Every world needs its heroes [...] They inspire us to be better than we are. And they protect from the darkness that's just around the corner."

(from Smallville Season 6x1: "Zod")

On why I hate the phrase "that's so lame"... http://bit.ly/Ps3uSS

On Tue, Dec 16, 2014 at 1:55 AM, Amandeep < " target="_blank"> > wrote:
Hi team,

I have created a cookbook for java installation and adding java home into  path environment variable and exporting the variables by executing the .profile file.

I am not able to execute .profile file as well as any sh file.
Please help in this. If my recipe code is required then i will paste it here.

Regards
Amandeep Singh




Archive powered by MHonArc 2.6.16.

§