Mailinglist Archive: opensuse (1231 mails)

< Previous Next >
Re: [opensuse] own environment variables in init scripts
2013/3/4 Cristian Rodríguez <crrodriguez@xxxxxxxxxxxx>:

The fact you don't find where do it should give you a solid idea of what's
going on..

I try to write a application with different services like apache,
freeradius, mysql, ldap, snmpd.

I know, it is maybe possible, to set env variables in
/etc/sysconfig/apache2 and mysql ...
But it has to be done for every config and service again and it is error-prune.

The goal is, to set this variables only one time on one place. All
applications and services can
rely on this without extra interaction.
Second is, that want modify the system and files are delivered with
the system or packages as less as possible (eg. use own vhosts, use
/etc/profile.d, use /etc/cron.d, and so on ..). So it is easier to
backup the config and rely to the default files (if possible), easier
to set up the system and automate the setup and it is easier to
describe and understanding the installation.

** what you are trying to do is an horrible bad idea ;P ***
What is horrible on it?

Care to share *exactly* what are you trying to accomplish here, there is
probably a sane way to do it.

One example for this, I told exactly in my first post (apache2). But
this is an example only.
The Question in general is, how to set environment variables global,
so that they are available in init
scripts (example for this is HOSTNAME)

The file /etc/boot.local is also NOT the solution, set env variables
ar not available in other init scripts.

The ONLY solution I found is to modify /etc/sysconfig/boot and source
there my configfile from /etc/profile.d/
But I'm not sure, if this is the bet, to modify this file.

Thanks Meike :-)
To unsubscribe, e-mail: opensuse+unsubscribe@xxxxxxxxxxxx
To contact the owner, e-mail: opensuse+owner@xxxxxxxxxxxx

< Previous Next >
Follow Ups