summaryrefslogtreecommitdiff
path: root/init
diff options
context:
space:
mode:
authorAn-Cheng Huang <ancheng@vyatta.com>2009-04-10 15:55:42 -0700
committerAn-Cheng Huang <ancheng@vyatta.com>2009-04-10 15:55:42 -0700
commitb9c92a3bb82e860c8368eb7933f5ec4ddcd74bcb (patch)
treed9486a725aef476a595156067aa5c0c9ce9b28ad /init
parent3939e96a8830755228bd2bbedb50db6808d36f80 (diff)
downloadinitramfs-tools-b9c92a3bb82e860c8368eb7933f5ec4ddcd74bcb.tar.gz
initramfs-tools-b9c92a3bb82e860c8368eb7933f5ec4ddcd74bcb.zip
merge 0.92o from git://git.debian.org/git/kernel/initramfs-tools.git
Diffstat (limited to 'init')
-rwxr-xr-xinit23
1 files changed, 18 insertions, 5 deletions
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