Update of /cvsroot/leaf/src/bering-uclibc/apps/config
In directory sc8-pr-cvs6.sourceforge.net:/tmp/cvs-serv24095

Modified Files:
        build-modules 
Log Message:
a few fixes

Index: build-modules
===================================================================
RCS file: /cvsroot/leaf/src/bering-uclibc/apps/config/build-modules,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** build-modules       11 Sep 2006 21:05:17 -0000      1.1
--- build-modules       13 Sep 2006 19:23:14 -0000      1.2
***************
*** 6,13 ****
  # Copyright (c) Paul Traina 2006, GPL v2
  #
! MODLIST=/etc/modules
! MODREPO=/mnt/modules.tgz
  LIBMOD=/lib/modules
  
  ##########################################################################
  progname=`basename $0`
--- 6,18 ----
  # Copyright (c) Paul Traina 2006, GPL v2
  #
! MODULES=/etc/modules
! MODREPO=/var/lib/lrpkg/mnt/modules.tgz
  LIBMOD=/lib/modules
  
+ MODLIST=/tmp/build-modules.$$.list
+ MODTEMP=/tmp/build-modules.$$.extract
+ 
+ trap "rm -rf $MODTEMP $MODLIST" EXIT
+ 
  ##########################################################################
  progname=`basename $0`
***************
*** 15,24 ****
  usage() {
      cat >&2 <<-EOF
!       Usage: $progname [ -m modules ] [ -f modules.tar.gz ] [ -l module-dir ]
  
!       Defaults:
!           -m $MODLIST
!           -f $MODREPO
!           -l $LIBMOD
  
        Extract kernel modules from $MODREPO into $LIBMOD
--- 20,29 ----
  usage() {
      cat >&2 <<-EOF
!       Usage: $progname [-f] [ -m modules-file ] [ -f modules.tar.gz ] [ -l 
module-dir ]
  
!       -f force
!       -m modules textfile ($MODLIST)
!       -r modules tarfile ($MODREPO)
!       -l modules directory ($LIBMOD)
  
        Extract kernel modules from $MODREPO into $LIBMOD
***************
*** 27,50 ****
  }
  
! args=`getopt -a -o hm:f:l: -n "$progname" -- "$@"`
! if [ $? != 0 ] ; then
!     usage
!     exit 1
! fi
  
! eval set -- "$args"
! while true ; do
!     case "$1" in
!       -h) usage;                      exit 0  ;;
!       -m) MODLIST="$2";               shift 2 ;;
!       -f) MODREPO="$2";               shift 2 ;;
!       -l) LIBMOD="$2";                shift 2 ;;
!       --) shift;                      break   ;;
!       *)  echo >&2 "Internal error";  exit 1  ;;
      esac
  done
  
! if [ ! -f $MODLIST ] ; then
!     echo >&2 "$progname: module list $MODLIST not found"
      exit 1
  fi
--- 32,51 ----
  }
  
! force=no
  
! while getopts hfm:r:l: option; do
!     case $option in
!       m) MODULES=$OPTARG      ;;
!       r) MODREPO=$OPTARG      ;;
!       l) LIBMOD=$OPTARG       ;;
!       f) force=yes            ;;
!       h) usage; exit 0        ;;
!       ?) usage; exit 1        ;;
      esac
  done
+ shift $((${OPTIND} - 1))
  
! if [ ! -f $MODULES ] ; then
!     echo >&2 "$progname: module list $MODULES not found"
      exit 1
  fi
***************
*** 62,71 ****
  ##########################################################################
  
! MODLIST=/tmp/build-modules-list.$$
! MODTEMP=/tmp/build-modules-extract.$$
! 
! for mod in $modules ; do
!    if [ ! -f $LIBMOD/${mod}.o ] ; then
!        missing="${mod}.o ${missing}"
     fi 
  done
--- 63,69 ----
  ##########################################################################
  
! for mod in `sed -e 's/[# ].*//' -e '/^$/d' $MODULES | sort` ; do
!    if [ ! -f $LIBMOD/${mod}.o -o "$force" = "yes" ] ; then
!        missing="${missing} ${mod}"
     fi 
  done
***************
*** 76,105 ****
  fi 
  
! echo "Missing kernel modules: ${missing}"
  
  #
  # get absolute path of all modules in tarfile first (sigh)
  #
! trap "rm -f $MODLIST" 0 1 2
  tar tzf $MODREPO > $MODLIST
- 
  for mod in $missing ; do
!     findmod="`grep -F ${mod} $MODLIST` ${findmod}"
  done    
  
- rm -f $MODLIST
- trap '' 0 1 2
- 
  #
  # Now do the actual module extraction to a temporary area and then
  # move the modules to /lib/modules
  #
- trap "rm -rf $MODTEMP" 0 1 2
  mkdir $MODTEMP
- 
  tar xzf $MODREPO -C $MODTEMP $findmod
  
! echo
! echo -n "Installing modules:"
  for mod in $findmod ; do
      echo -n " `basename $mod .o`"
--- 74,96 ----
  fi 
  
! echo "Missing kernel modules:${missing}"
  
  #
  # get absolute path of all modules in tarfile first (sigh)
  #
! echo "Reading modules directory..."
  tar tzf $MODREPO > $MODLIST
  for mod in $missing ; do
!     findmod="${findmod} `grep -F ${mod}.o $MODLIST`"
  done    
  
  #
  # Now do the actual module extraction to a temporary area and then
  # move the modules to /lib/modules
  #
  mkdir $MODTEMP
  tar xzf $MODREPO -C $MODTEMP $findmod
  
! echo -n "Copying modules:"
  for mod in $findmod ; do
      echo -n " `basename $mod .o`"
***************
*** 108,113 ****
  echo
  
- rm -rf $MODTEMP
- trap '' 0 1 2
- 
  exit 0
--- 99,101 ----


-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
leaf-cvs-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/leaf-cvs-commits

Reply via email to