summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDave Reisner <d@falconindy.com>2011-06-04 19:07:31 +0200
committerDave Reisner <d@falconindy.com>2011-06-07 20:38:43 +0200
commitb7e37eb94bf4695c42ff38a9e760f545644242da (patch)
tree5b358280fc16281c4b2d5f3c018cb1f11e228820
parent5aa2f5872f1f6b391d33875dfe18dcc3a3eaca24 (diff)
downloadmkinitcpio-b7e37eb94bf4695c42ff38a9e760f545644242da.tar.gz
mkinitcpio-b7e37eb94bf4695c42ff38a9e760f545644242da.tar.xz
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 <d@falconindy.com>
-rw-r--r--init2
1 files changed, 1 insertions, 1 deletions
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} "$@"