I think essentially everyone on *nix guarantees some level of environment - e.g., USER, PATH, probably UID and GID, and likely a few others.

Not sure, but hey, that's why I didn't rely on it. :)

On May 31, 2010, at 4:55 PM, Michael DeHaan wrote:

If your process is execed directly from custom /bin/init is their an ENV at all? Not that it should be likely or sane ... but it is legal :). +1 to not relying on that whenever possible.

-- Michael

On May 31, 2010, at 5:39 PM, Luke Kanies <[email protected]> wrote:

On May 31, 2010, at 2:36 PM, William Van Hevelingen wrote:

Facter.envfact(:deploydate) { confine :kernel => %w{Windows} }

Thanks that looks great.

In general, the reason I've always avoided relying on ENV is that it's so easy for the data to not be right at different times, at least I think I've experienced that. It's always tough to track whether a given ENV variable is overwriteable, guaranteed, always set, etc.

Yea I noticed that the documentation is very hard to find concerning the ENV object and whether any ENV variables are guaranteed.

It's not about the ENV hash itself, it's about what the shell/ environment actually provides. And trusting, say, HP-UX vs. Debian vs. Red Hat to provide similar information just seemed crazy. And I wrote most of the first versions of Facter specifically because I was so distrustful if everything the OS thought I wanted to know.

--
If it jams, force it. If it breaks, it probably needed replacing
anyway. -- Lowrey's Law
---------------------------------------------------------------------
Luke Kanies  -|-   http://puppetlabs.com   -|-   +1(615)594-8199


--
You received this message because you are subscribed to the Google Groups "Puppet Developers" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to [email protected] . For more options, visit this group at http://groups.google.com/group/puppet-dev?hl=en .


--
You received this message because you are subscribed to the Google Groups "Puppet Developers" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to [email protected] . For more options, visit this group at http://groups.google.com/group/puppet-dev?hl=en .


--
Today at work an ethernet switch decided to take the 'N' out of NVRAM
    -- Richard Letts
---------------------------------------------------------------------
Luke Kanies  -|-   http://puppetlabs.com   -|-   +1(615)594-8199

--
You received this message because you are subscribed to the Google Groups "Puppet 
Developers" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/puppet-dev?hl=en.

Reply via email to