Sample Header Ad - 728x90

How can daemons source environment variables on a machine without persistent storage

1 vote
0 answers
194 views
I'm working on a Yocto Project build of an AARCH64 system, where I need the monit daemon (or at least a process started by monit) to access an environment variable I'm setting. It's my understanding that normally creating a script under /etc/profile.d would work, but since there's no persistent storage on the machine, I'm pretty sure the monit daemon is started before that script is created in profile.d (I created it under a do_install() function in a bitbake recipe). I do have a workaround where I just export the environment variable in the scripts called by monit, but that feels like the incorrect way to do it. Any thoughts?
Asked by Patrick M (11 rep)
Sep 13, 2023, 06:51 PM
Last activity: Sep 14, 2023, 08:37 PM