Update of /cvsroot/leaf/src/bering-uclibc/apps/modules
In directory sc8-pr-cvs6.sourceforge.net:/tmp/cvs-serv21617
Modified Files:
modules modutils
Log Message:
simplify module loading
Index: modutils
===================================================================
RCS file: /cvsroot/leaf/src/bering-uclibc/apps/modules/modutils,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** modutils 26 Jun 2006 17:32:31 -0000 1.1
--- modutils 30 Oct 2006 21:25:17 -0000 1.2
***************
*** 1,60 ****
#! /bin/sh
! # /etc/init.d/modules: loads the appropriate modules in `boot'.
# Editted for LRP -- Dave Cinege
! # Modified to mount filesystems by Charles Steinkuehler
RCDLINKS="S,S20"
PATH="/sbin:/bin:/usr/sbin:/usr/bin"
- OIFS="$IFS"
kernel=`uname -r`
! DIR="/lib/modules"
! MNT="/var/lib/lrpkg/mnt"
! MOUNT=""
!
! ln -s $DIR /lib/modules/$kernel
# Loop over every line in /etc/modules.
echo 'Loading modules: '
while read module args
do
! case "$module" in
! \#*|"") continue ;;
! !) set -- $args
! case $1 in
! mount) [ -n "$MOUNT" ] && umount $MOUNT
! mount -r -t $2 $3 $MNT
! MOUNT="$MNT" ;;
! umount) [ -n "$MOUNT" ] && umount $MOUNT
! MOUNT="" ;;
! dir) DIR="$2" ;;
! esac
! continue ;;
! esac
!
! echo -n "$module - "
! MDIR=`dirname $module`
! MBASE=`basename $module`
! CNT=0
! while read MOD ; do
! CNT=$(( $CNT + 1 ))
! XMOD=$MOD
! done <<- EOF
! $(find $MOUNT$DIR/$MDIR -name $MBASE.o)
! EOF
! case $CNT in
! 0) echo "NOT FOUND!" ;;
! 1) insmod $XMOD $args ;;
! *) echo "AMBIGUOUS! More than one module found:"
! find $MOUNT$DIR/$MDIR -name $MBASE.o |
! sed "s:^$MOUNT::;s:/./:/:" ;;
! esac
! done << DATA # Insure file ends with LF...
! $(cat /etc/modules)
!
! DATA
!
! echo
! [ -n "$MOUNT" ] && umount $MOUNT
--- 1,22 ----
#! /bin/sh
! # /etc/init.d/modules: loads the appropriate modules
# Editted for LRP -- Dave Cinege
! # Optimized by Eric Wolzak
RCDLINKS="S,S20"
PATH="/sbin:/bin:/usr/sbin:/usr/bin"
kernel=`uname -r`
! ln -s /lib/modules /lib/modules/$kernel
# Loop over every line in /etc/modules.
echo 'Loading modules: '
+ grep ^[a-z0-9A-Z] /etc/modules |
while read module args
do
! insmod $module $args 2>/dev/null
! lsmod | grep -n -q ^$module || \
! logger modutils module $module could not be loaded
! done
Index: modules
===================================================================
RCS file: /cvsroot/leaf/src/bering-uclibc/apps/modules/modules,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** modules 14 Sep 2006 17:32:04 -0000 1.4
--- modules 30 Oct 2006 21:25:17 -0000 1.5
***************
*** 12,25 ****
# tarball for the dependencies and correct loading order.
- # Available commands:
- # Mount a filesystem to read modules from
- # ! mount <filesystem> <device>
- # Unmount a mounted filesystem
- # ! umount
- # Set the module load directory (defaults to /lib/modules)
- # ! dir <directory>
- # directory should contain a leading slash and is relative to root if nothing
- # is mounted, or the root of any mounted filesystem specified with ! mount
-
########################################################################
# More modules available from:
--- 12,15 ----
-------------------------------------------------------------------------
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