PDA

View Full Version : SLES-Other Environment product



AdminWintel
17-Dec-2015, 10:30
Hello,

I am looking for a proper manner to set the environment product (Production, Development, etc...) in SLES.

How do you do that ? Sysconfig variable ? OS description ?

BR

jmozdzen
17-Dec-2015, 11:25
Hi BR,

> I am looking for a proper manner to set the environment product (Production, Development, etc...) in SLES.

admittedly, I do not fully understand the objectives.

As this is nothing any of the standard tools would use, you're free to define your own mechanism. IOW, you'll have to either come up with a way your tools will read the information, or check how your tools (if already finalized) expect to receive that information. Then you can decide on how to provide.

A typical mechanism would be a file containing that information, and putting that into /etc/sysconfig (basically a sourcable shell script that will set an environment variable) looks like a good idea: You'll have a file in a common location, you can easily update it manually and automatically, and your 'consumers' can decide to either read the file directly, or have some invoking script source the file, enabling the consumer to check the environment for the then-set env variable.

Regards,
Jens