Rich Freeman on 12 Mar 2013 18:50:39 -0700 |
[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]
Re: [PLUG] Setting an environment variable for servers on Linux... |
On Tue, Mar 12, 2013 at 9:16 PM, Matt Murphy <mattyhead@gmail.com> wrote: > Those rc#.d scripts define environments for individual processes, I think. > I don't think there's a quick way to do what you want to do. Anyone? I would imagine that this would vary based on your sysvinit implementation. With OpenRC you can set variables per-service in /etc/conf.d, and I imagine that systemd would offer something similar within its unit files. I believe that anything set in /etc/env.d/ will affect services as well as interactive shells under OpenRC. Considering my apache process appears to have picked up an XSESSION from there that seems likely. >From a purely linux-based standpoint the kernel runs init, and then init does whatever it wants to do. Anything inherited by a process was set by init or one of the children between it and the process of interest. Distros tend to vary a fair bit in terms of their preferred way of accomplishing this. Rich ___________________________________________________________________________ Philadelphia Linux Users Group -- http://www.phillylinux.org Announcements - http://lists.phillylinux.org/mailman/listinfo/plug-announce General Discussion -- http://lists.phillylinux.org/mailman/listinfo/plug