From b9c92a3bb82e860c8368eb7933f5ec4ddcd74bcb Mon Sep 17 00:00:00 2001 From: An-Cheng Huang Date: Fri, 10 Apr 2009 15:55:42 -0700 Subject: merge 0.92o from git://git.debian.org/git/kernel/initramfs-tools.git --- init | 23 ++++++++++++++++++----- 1 file changed, 18 insertions(+), 5 deletions(-) (limited to 'init') diff --git a/init b/init index e287739..102eda2 100755 --- a/init +++ b/init @@ -124,7 +124,7 @@ for x in $(cat /proc/cmdline); do debug) debug=y quiet=n - exec >/tmp/initramfs.debug 2>&1 + exec >/dev/.initramfs/initramfs.debug 2>&1 set -x ;; debug=*) @@ -204,10 +204,23 @@ if [ ! -x "${rootmnt}${init}" ]; then panic "No init found. Try passing init= bootarg." fi -# Confuses /etc/init.d/rc -if [ -n ${debug} ]; then - unset debug -fi +# don't leak too much of env - some init(8) don't clear it +# (keep init, rootmnt) +unset debug +unset MODPROBE_OPTIONS +unset DPKG_ARCH +unset ROOTFLAGS +unset ROOTFSTYPE +unset ROOTDELAY +unset ROOT +unset blacklist +unset break +unset noresume +unset panic +unset quiet +unset readonly +unset resume +unset resume_offset # Chain to real filesystem maybe_break init -- cgit v1.2.3