1 |
Hi, |
2 |
|
3 |
the recent Apache 2.2.6 ebuild brought an /etc/init.d/apache2 that |
4 |
doesn't honour the KEEPENV variable anymore. |
5 |
|
6 |
Formerly one could preserve some of the environment variables (while all |
7 |
others would be unset to keep Apache's environment tidy). |
8 |
|
9 |
To resurrect that KEEPENV variable, I put in /etc/conf.d/apache2: |
10 |
|
11 |
|
12 |
# first set all variables |
13 |
. /etc/profile |
14 |
|
15 |
# |
16 |
# Environment variables to keep |
17 |
# All environment variables are cleared from apache |
18 |
# Use this to preserve some of them |
19 |
# NOTE!!! It's very important that this contains PATH |
20 |
|
21 |
KEEPENV="PATH PWD LANG NLS_LANG ORACLE_HOME ORACLE_SID ORA_NLS10 LD_LIBRARY_PATH" |
22 |
# only an example |
23 |
|
24 |
while IFS="=" read name value ; do |
25 |
case " $KEEPENV " in |
26 |
*" $name "*) ;; |
27 |
*) unset $name 2>/dev/null;; |
28 |
esac |
29 |
done < <(printenv) |
30 |
|
31 |
|
32 |
|
33 |
Regards... |
34 |
Michael |
35 |
-- |
36 |
gentoo-user@g.o mailing list |