summaryrefslogtreecommitdiff
path: root/init
diff options
context:
space:
mode:
authorAn-Cheng Huang <ancheng@vyatta.com>2009-04-10 16:01:23 -0700
committerAn-Cheng Huang <ancheng@vyatta.com>2009-04-10 16:01:23 -0700
commite557e8a53145506bd95cd37c5e672169ad85b23a (patch)
treedcaa330a658e7c06f2766845cbc5dfbeaea2de24 /init
parent2e53aeece24d032eb852d6c784d17081c821e268 (diff)
parentb9c92a3bb82e860c8368eb7933f5ec4ddcd74bcb (diff)
downloadinitramfs-tools-e557e8a53145506bd95cd37c5e672169ad85b23a.tar.gz
initramfs-tools-e557e8a53145506bd95cd37c5e672169ad85b23a.zip
Merge branch 'upstream' into jenner
Conflicts: debian/changelog
Diffstat (limited to 'init')
-rwxr-xr-xinit23
1 files changed, 18 insertions, 5 deletions
diff --git a/init b/init
index 537a92f..ee7dd2a 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