SVN: geninitrd/trunk/geninitrd

sparky sparky at pld-linux.org
Thu Feb 1 11:20:43 CET 2007


Author: sparky
Date: Thu Feb  1 11:20:37 2007
New Revision: 8217

Modified:
   geninitrd/trunk/geninitrd
Log:
- reverted last two changes, szhould work but it requires new busybox
- won't work with old one, need some check for that


Modified: geninitrd/trunk/geninitrd
==============================================================================
--- geninitrd/trunk/geninitrd	(original)
+++ geninitrd/trunk/geninitrd	Thu Feb  1 11:20:37 2007
@@ -1547,8 +1547,12 @@
 EOF
 	cat << EOF >> "$s"
 mount -t $rootFs -r \$device /newroot
+init="\$(busybox awk ' /init=\// { gsub(/.*init=/,NIL,\$0); gsub(/ .*/,NIL,\$0); print \$0; }  ' /proc/cmdline )"
+if [ -z "\$init" -o ! -x "/newroot\$init" ]; then
+	init=/sbin/init
+fi
 umount /proc
-exec switchroot /newroot
+exec switch_root /newroot \$init
 EOF
 	# we need real file, not symlink
 	rm -f $MNTIMAGE/init


More information about the pld-cvs-commit mailing list