[leaf-commits] src/bering-uclibc4/source/initrd buildtool.cfg, 1.10, 1.11 root.linuxrc, 1.17, 1.18

Andrew <[email protected]> Thu, 20 Jan 2011 23:07:45 +0000
Newsgroups gmane.linux.leaf.cvs
Message-ID <[email protected]>
Update of /cvsroot/leaf/src/bering-uclibc4/source/initrd
In directory sfp-cvsdas-2.v30.ch3.sourceforge.com:/tmp/cvs-serv7084

Modified Files:
	buildtool.cfg root.linuxrc 
Log Message:
Added error processing at file copying and booting from initramfs if there is error on rootfs copying; changed revision.


Index: root.linuxrc
===================================================================
RCS file: /cvsroot/leaf/src/bering-uclibc4/source/initrd/root.linuxrc,v
retrieving revision 1.17
retrieving revision 1.18
diff -C2 -d -r1.17 -r1.18
*** root.linuxrc	20 Jan 2011 22:41:45 -0000	1.17
--- root.linuxrc	20 Jan 2011 23:07:43 -0000	1.18
***************
*** 364,367 ****
--- 364,369 ----
  qt mount -t tmpfs tmpfs /newroot/var/log -o size=$log_size
  
+ copy_err=0
+ 
  for i in `ls /`; do
  	case $i in
***************
*** 369,384 ****
  		sys) ;;
  		newroot) ;;
! 		*) cp -a $i /newroot ;;
  	esac
  done
! qt umount /tmp
! qt umount /var/log
! 
! [ "$VERBOSE" ] && Lecho "Switch_root into new rootfs..."
  
! [ ! $VERBOSE ] && rm /linuxrc.err
  
! umount /sys /proc
! exec switch_root -c /dev/console /newroot /var/lib/lrpkg/root.helper
  
  exit 0
--- 371,391 ----
  		sys) ;;
  		newroot) ;;
! 		*) qt cp -a $i /newroot || copy_err=1 ;;
  	esac
  done
! if [ "$copy_err" -eq 0 ]; then
! 	qt umount /tmp
! 	qt umount /var/log
  
! 	[ "$VERBOSE" ] && Lecho "Switch_root into new rootfs..."
  
! 	[ ! $VERBOSE ] && rm /linuxrc.err
  
+ 	umount /sys /proc
+ 	exec switch_root -c /dev/console /newroot /var/lib/lrpkg/root.helper
+ else
+ 	Lecho "Copying files into new_root failed! new rootfs is full?"
+ 	Lecho "Failsafe boot directly from initramfs..."
+ 	exec /sbin/init
+ fi
  exit 0

Index: buildtool.cfg
===================================================================
RCS file: /cvsroot/leaf/src/bering-uclibc4/source/initrd/buildtool.cfg,v
retrieving revision 1.10
retrieving revision 1.11
diff -C2 -d -r1.10 -r1.11
*** buildtool.cfg	20 Jan 2011 22:41:45 -0000	1.10
--- buildtool.cfg	20 Jan 2011 23:07:43 -0000	1.11
***************
*** 47,51 ****
  
  		Version = 4.0.0
! 		Revision = 9
  		
  		Help <<EOF
--- 47,51 ----
  
  		Version = 4.0.0
! 		Revision = 10
  		
  		Help <<EOF
***************
*** 84,88 ****
  
  		Version = 4.0.0
! 		Revision = 9
  		
  		Help <<EOF
--- 84,88 ----
  
  		Version = 4.0.0
! 		Revision = 10
  		
  		Help <<EOF
***************
*** 121,125 ****
  
  		Version = 4.0.0
! 		Revision = 9
  		
  		Help <<EOF
--- 121,125 ----
  
  		Version = 4.0.0
! 		Revision = 10
  		
  		Help <<EOF


------------------------------------------------------------------------------
Special Offer-- Download ArcSight Logger for FREE (a $49 USD value)!
Finally, a world-class log management solution at an even better price-free!
Download using promo code Free_Logger_4_Dev2Dev. Offer expires 
February 28th, so secure your free ArcSight Logger TODAY! 
http://p.sf.net/sfu/arcsight-sfd2d