summaryrefslogtreecommitdiff
path: root/rc.d
diff options
context:
space:
mode:
authorSebastien Luttringer <seblu@seblu.net>2011-05-05 01:42:07 +0200
committerSebastien Luttringer <seblu@seblu.net>2011-05-21 18:30:54 +0200
commitd1be877eb0ad3be634cee08aada8f8d1265023a4 (patch)
treeb3f5811454cd94a9283e680fbfab5b6ddebcdf14 /rc.d
parent9888b262c2deb32064b30eb637ece9e424356777 (diff)
Add TERM var to rc.d cleaned env
We need to do this to allow a correct detection of terminal colors in functions sourced by rc.d scripts Signed-off-by: Sebastien Luttringer <seblu@seblu.net>
Diffstat (limited to 'rc.d')
-rwxr-xr-xrc.d1
1 files changed, 1 insertions, 0 deletions
diff --git a/rc.d b/rc.d
index 49b7c2f..55871b1 100755
--- a/rc.d
+++ b/rc.d
@@ -50,6 +50,7 @@ case $1 in
ENV+=" PREVLEVEL='${runlevel:0:1}'"
ENV+=" RUNLEVEL='${runlevel:2:1}'"
ENV+=" CONSOLE='${CONSOLE:-/dev/console}'"
+ ENV+=" TERM='${TERM}'"
for i; do
[[ -x "/etc/rc.d/$i" ]] && cd / && eval /usr/bin/env -i $ENV "/etc/rc.d/$i" "$action"
(( ret += !! $? )) # clamp exit value to 0/1