ppcrcd/trunk/conf.dir/usr/lib/ppcrcd/functions
sparky
cvs at pld-linux.org
Fri Mar 3 01:20:23 CET 2006
Author: sparky
Date: Fri Mar 3 01:20:22 2006
New Revision: 7069
Modified:
ppcrcd/trunk/conf.dir/usr/lib/ppcrcd/functions
Log:
- added get_module_by_modalias function, may be useful in future
Modified: ppcrcd/trunk/conf.dir/usr/lib/ppcrcd/functions
==============================================================================
--- ppcrcd/trunk/conf.dir/usr/lib/ppcrcd/functions (original)
+++ ppcrcd/trunk/conf.dir/usr/lib/ppcrcd/functions Fri Mar 3 01:20:22 2006
@@ -125,4 +125,16 @@
fi
}
+get_module_by_modalias() {
+ CHECK="$1"
+ while read ISALIAS MODALIAS MODULE; do
+ [[ $ISALIAS = alias ]] || continue
+ if [[ $CHECK = $MODALIAS ]]; then
+ echo $MODULE
+ return 0
+ fi
+ done < /lib/modules/$(uname -r)/modules.alias
+ return 1
+}
+
# vi:ts=4:sw=4
More information about the pld-cvs-commit
mailing list