Magellan Linux

Annotation of /alx-src/trunk/tinyalxconfig-ng/functions/config_modules.sh

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1004 - (hide annotations) (download) (as text)
Tue Aug 4 15:17:16 2009 UTC (14 years, 9 months ago) by niro
File MIME type: application/x-sh
File size: 1258 byte(s)
-usb-printing support
1 niro 537 # $Id$
2 niro 386 # configures printing on the host via mysql db settings
3 niro 539 # Note must be the first configure script which will be started
4 niro 386
5     add_modules()
6     {
7     local modules="$@"
8 niro 393 local modfile="/etc/modules.autoload"
9 niro 386 local mod
10    
11     for mod in ${modules}
12     do
13 niro 393 [[ -n $(find /lib/modules/$(uname -r) -name ${mod}.[o,k]*) ]] && \
14 niro 386 echo "${mod}" >> ${modfile}
15     done
16     }
17    
18     config_modules()
19     {
20     local modfile
21 niro 459 local modules_list
22 niro 386
23     # location of the modules.autoload file
24 niro 393 modfile="/etc/modules.autoload"
25 niro 386
26     # clear the old one
27     :> ${modfile}
28    
29     # needed for printing:
30 niro 1004 add_modules lp parport parport_pc usblp
31 niro 386
32 niro 459 # get all available modules-ids
33     modules_list=$(mysqldo "select module from cfg_modules where serial='${ALX_SERIAL}'")
34     [[ ! -z ${modules_list} ]] && add_modules ${modules_list}
35 niro 386
36 niro 459 # network modules - but exclude "auto" modules
37     modules_list=$(mysqldo "select module from cfg_interfaces where serial='${ALX_SERIAL}' and not module='auto'")
38     [[ ! -z ${modules_list} ]] && add_modules ${modules_list}
39 niro 386
40 niro 459 # fixme: does udev handle this already?? i think so!
41     # special agp and drm modules needed by some graphic drivers
42 niro 474 evaluate_table_xml cfg_graphic
43 niro 459 case ${cfg_grafic_module} in
44     # intel i810 needs intel-agp module to work probably
45     i810) add_modules intel-agp ;;
46     esac
47 niro 386 }