Update of /cvsroot/leaf/src/bering-uclibc4/source/initrd
In directory sfp-cvsdas-2.v30.ch3.sourceforge.com:/tmp/cvs-serv9188

Modified Files:
        root.linuxrc 
Log Message:
Added logic to handle comma-separated LEAFCFG

Index: root.linuxrc
===================================================================
RCS file: /cvsroot/leaf/src/bering-uclibc4/source/initrd/root.linuxrc,v
retrieving revision 1.13
retrieving revision 1.14
diff -C2 -d -r1.13 -r1.14
*** root.linuxrc        8 Jul 2010 08:36:00 -0000       1.13
--- root.linuxrc        10 Nov 2010 20:58:57 -0000      1.14
***************
*** 161,177 ****
  
  # Try to mount configuration device and read any leaf.cfg file
  [ "$VERBOSE" ] && Lecho "Looking for leaf.cfg..."
! IFS=:
! set -- $KCMD_LEAFCFG
! IFS="$OIFS"
! if [ -b "$1" ] ; then
!       for FS in $2 $FILESYSTEMS; do
!               if qt mount -nrt $FS $1 $MNT ; then 
!                       [ -r $MNT/leaf.cfg ] && source $MNT/leaf.cfg
!                       break
!               fi
!       done
! fi
! qt umount $MNT
  
  # Set config variables, falling back to defaults
--- 161,190 ----
  
  # Try to mount configuration device and read any leaf.cfg file
+ # $KCMD_LEAFCFG could look like any of the following:
+ #     /dev/fd0:vfat,/dev/sr0:iso9660
+ #     /dev/sda1:vfat
+ #     /dev/sr0
  [ "$VERBOSE" ] && Lecho "Looking for leaf.cfg..."
! IFS=','
! for dev in ${KCMD_LEAFCFG}; do
!       IFS=':'
!       set -- ${dev}
!       IFS="$OIFS"
!       if [ -b "$1" ] ; then
!               for FS in $2 $FILESYSTEMS; do
!                       [ "$VERBOSE" ] && Lecho "Mounting $1 on $MNT as $FS"
!                       if qt mount -nrt $FS $1 $MNT ; then 
!                               if [ -r $MNT/leaf.cfg ] ; then
!                                       [ "$VERBOSE" ] && Lecho "Sourcing 
leaf.cfg from $1"
!                                       source $MNT/leaf.cfg
!                                       qt umount $MNT
!                                       break 2
!                               fi
!                               qt umount $MNT
!                               break
!                       fi
!               done
!       fi
! done
  
  # Set config variables, falling back to defaults


------------------------------------------------------------------------------
The Next 800 Companies to Lead America's Growth: New Video Whitepaper
David G. Thomson, author of the best-selling book "Blueprint to a 
Billion" shares his insights and actions to help propel your 
business during the next growth cycle. Listen Now!
http://p.sf.net/sfu/SAP-dev2dev
_______________________________________________
leaf-cvs-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/leaf-cvs-commits

Reply via email to