It looks like the launchd.conf
does not load my environment variable anymore.
Has anyone else noticed that?
Is there another solution to permanently set
Here are the commands to restore the old behavior:
# create a script that calls launchctl iterating through /etc/launchd.conf
echo '#!/bin/sh
while read line || [[ -n $line ]] ; do launchctl $line ; done < /etc/launchd.conf;
' > /usr/local/bin/launchd.conf.sh
# make it executable
chmod +x /usr/local/bin/launchd.conf.sh
# launch the script at startup
echo '
Label
launchd.conf
ProgramArguments
sh
-c
/usr/local/bin/launchd.conf.sh
RunAtLoad
' > /Library/LaunchAgents/launchd.conf.plist
Now you can specify commands like setenv JAVA_HOME /Library/Java/Home
in /etc/launchd.conf
.
Checked on El Capitan.