[arch-projects] [INITSCRIPTS][PATCH 5/6] Add TERM var to rc.d cleaned env

Sebastien Luttringer seblu at seblu.net
Wed May 4 21:04:49 EDT 2011


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 at seblu.net>
---
 rc.d |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/rc.d b/rc.d
index 49b7c2f..2ecb342 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:-linux}'"
 		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
-- 
Sebastien "Seblu" Luttringer



More information about the arch-projects mailing list