From b7e37eb94bf4695c42ff38a9e760f545644242da Mon Sep 17 00:00:00 2001 From: Dave Reisner Date: Sat, 4 Jun 2011 13:07:31 -0400 Subject: init: purge environment before leaving early userspace We preserve TERM, but everything else can be destroyed from the environment. Without preserving TERM, the value is reset to 'dumb' in userspace, and we get false readings by the initscripts on terminal capabilities. Signed-off-by: Dave Reisner --- init | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/init b/init index 1f6bc4e..a1398b6 100644 --- a/init +++ b/init @@ -117,4 +117,4 @@ for d in proc sys dev run; do /bin/umount /${d} fi done -exec /sbin/switch_root -c /dev/console /new_root ${init} "$@" +exec env -i TERM=$TERM /sbin/switch_root -c /dev/console /new_root ${init} "$@" -- cgit v1.2.3-24-g4f1b