1833877 Members
2077 Online
110063 Solutions
New Discussion

Re: inetd environment

 
SOLVED
Go to solution
Domenico Viggiani
Super Advisor

inetd environment

I'd like to pass a few of specific environment variables to servers started by inetd.
What is the best way to do it?
3 REPLIES 3
A. Clay Stephenson
Acclaimed Contributor

Re: inetd environment

You can try modifying the /sbin/init.d/inetd script and put your export statements before then inetd invocation in the start) section. I'm don't know if inetd does a subsequent putenv() that would wipe out any unexpected env variables.
If it ain't broke, I can fix that.
Dani Seely
Valued Contributor

Re: inetd environment

Hey Domenico,
You should edit /etc/inetd.conf and add the env variables you want the services to run with ... this will allow the daemon to run with the specific parameter from within inetd.
Together We Stand!
Bill Hassell
Honored Contributor
Solution

Re: inetd environment

You could edit the inetd file in /sbin/init.d but this file may be replaced at any time in the future by a patch. Configurations for startup scripts (like inetd) are handled in the /etc/rc.config.d directory. There is no specific inetd file in that directory so you can add the new env values in /etc/rc.config to a new file called /etc/rc.config.d/inetd. whatever is in that script will be added to the startup environment.


Bill Hassell, sysadmin