/[gentoo-x86]/eclass/linux-mod.eclass
Gentoo

Diff of /eclass/linux-mod.eclass

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

Revision 1.50 Revision 1.51
1# Copyright 1999-2004 Gentoo Foundation 1# Copyright 1999-2004 Gentoo Foundation
2# Distributed under the terms of the GNU General Public License v2 2# Distributed under the terms of the GNU General Public License v2
3# $Header: /var/cvsroot/gentoo-x86/eclass/linux-mod.eclass,v 1.50 2005/07/11 21:03:56 brix Exp $ 3# $Header: /var/cvsroot/gentoo-x86/eclass/linux-mod.eclass,v 1.51 2005/08/22 12:12:10 brix Exp $
4 4
5# Description: This eclass is used to interface with linux-info in such a way 5# Description: This eclass is used to interface with linux-info in such a way
6# to provide the functionality required and initial functions 6# to provide the functionality required and initial functions
7# required to install external modules against a kernel source 7# required to install external modules against a kernel source
8# tree. 8# tree.
372 done 372 done
373 eend 0 373 eend 0
374 return 0 374 return 0
375} 375}
376 376
377display_postinst() {
378 # if we haven't determined the version yet, we need too.
379 get_version;
380
381 local modulename moduledir sourcedir moduletemp file i
382
383 file=${ROOT}/etc/modules.autoload.d/kernel-${KV_MAJOR}.${KV_MINOR}
384 file=${file/\/\///}
385
386 for i in ${MODULE_IGNORE}
387 do
388 MODULE_NAMES=${MODULE_NAMES//${i}(*}
389 done
390
391 if [[ -n ${MODULE_NAMES} ]]
392 then
393 einfo "If you would like to load this module automatically upon boot"
394 einfo "please type the following as root:"
395 for i in ${MODULE_NAMES}
396 do
397 unset libdir srcdir objdir
398 for n in $(find_module_params ${i})
399 do
400 eval ${n/:*}=${n/*:/}
401 done
402 einfo " # echo \"${modulename}\" >> ${file}"
403 done
404 einfo
405 fi
406}
407
408find_module_params() { 377find_module_params() {
409 local matched_offset=0 matched_opts=0 test="${@}" temp_var result 378 local matched_offset=0 matched_opts=0 test="${@}" temp_var result
410 local i=0 y=0 z=0 379 local i=0 y=0 z=0
411 380
412 for((i=0; i<=${#test}; i++)) 381 for((i=0; i<=${#test}; i++))
529 498
530linux-mod_pkg_postinst() { 499linux-mod_pkg_postinst() {
531 update_depmod; 500 update_depmod;
532 update_modules; 501 update_modules;
533 update_moduledb; 502 update_moduledb;
534 display_postinst;
535} 503}
536 504
537linux-mod_pkg_postrm() { 505linux-mod_pkg_postrm() {
538 remove_moduledb; 506 remove_moduledb;
539} 507}

Legend:
Removed from v.1.50  
changed lines
  Added in v.1.51

  ViewVC Help
Powered by ViewVC 1.1.20