SVN: geninitrd/trunk/geninitrd

glen glen at pld-linux.org
Mon Sep 17 14:20:20 CEST 2012


Author: glen
Date: Mon Sep 17 14:20:19 2012
New Revision: 12581

Modified:
   geninitrd/trunk/geninitrd
Log:
make internal variables visible when debuginitrd=sh

Modified: geninitrd/trunk/geninitrd
==============================================================================
--- geninitrd/trunk/geninitrd	(original)
+++ geninitrd/trunk/geninitrd	Mon Sep 17 14:20:19 2012
@@ -1379,8 +1379,13 @@
 		fi
 	done
 
-	# make debugshell() invoke subshell if $DEBUGINITRD=sh
 	if [ "$DEBUGINITRD" = "sh" ]; then
+		# export some vars for subshell debug to work
+		export CMDLINE ROOT ROOTFS ROOTDEV ROOTFSFLAGS DEBUGINITRD INIT
+		export LVM_ROOTVG LVM_SUSPENDVG LVM_VGVOLUMES
+		export rootnr attrs majmin major minor device
+
+		# make debugshell() invoke subshell if $DEBUGINITRD=sh
 		debugshell() {
 EOF
 if is_yes "$RUN_SULOGIN_ON_ERR"; then
@@ -1456,6 +1461,7 @@
 
 # clean up env
 add_linuxrc <<-'EOF'
+if [ ! "$DEBUGINITRD" ]; then
 	ifs=$IFS
 	IFS="
 	"
@@ -1484,6 +1490,7 @@
 		esac
 	done
 	IFS=$ifs
+fi
 EOF
 
 if [ "$INITRDFS" = "initramfs" ]; then


More information about the pld-cvs-commit mailing list