From fa9cbeeda84c645aac2a71f98796c411f378eced Mon Sep 17 00:00:00 2001 From: Andrew Gaffney Date: Fri, 14 Nov 2008 12:19:05 -0600 Subject: [PATCH] Call switch_root with 'env -i' to clean out the kernel-defined key/value pairs --- ChangeLog | 4 ++++ defaults/linuxrc | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 0c0fbd3..1ac994b 100644 --- a/ChangeLog +++ b/ChangeLog @@ -2,6 +2,10 @@ # Copyright 1999-2008 Gentoo Foundation; 2008 Chris Gianelloni, Andrew Gaffney # Distributed under the GPL v2 + 14 Nov 2008; Andrew Gaffney defaults/linuxrc: + Call switch_root with 'env -i' to clean out the kernel-defined key/value + pairs + 14 Nov 2008; Andrew Gaffney defaults/linuxrc: Skip good_root check for /dev/nfs for gentoo bug #246759 diff --git a/defaults/linuxrc b/defaults/linuxrc index 2d36332..ba5d0c7 100644 --- a/defaults/linuxrc +++ b/defaults/linuxrc @@ -668,7 +668,7 @@ umount /sys || echo '*: Failed to unmount the ramdisk /sys!' umount /proc || echo '*: Failed to unmount the ramdisk /proc!' echo -e "${BOLD}.${NORMAL}" -exec switch_root -c "/dev/console" "${CHROOT}" "${REAL_INIT:-/sbin/init}" "${INIT_OPTS}" +exec env -i switch_root -c "/dev/console" "${CHROOT}" "${REAL_INIT:-/sbin/init}" "${INIT_OPTS}" # If we get here, something bad has happened splash 'verbose' -- 2.26.2