Contents of /alx-src/trunk/tinyalxconfig-ng/functions/config_modules.sh
Parent Directory | Revision Log
Revision 1004 -
(show 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)
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 | # $Id$ |
2 | # configures printing on the host via mysql db settings |
3 | # Note must be the first configure script which will be started |
4 | |
5 | add_modules() |
6 | { |
7 | local modules="$@" |
8 | local modfile="/etc/modules.autoload" |
9 | local mod |
10 | |
11 | for mod in ${modules} |
12 | do |
13 | [[ -n $(find /lib/modules/$(uname -r) -name ${mod}.[o,k]*) ]] && \ |
14 | echo "${mod}" >> ${modfile} |
15 | done |
16 | } |
17 | |
18 | config_modules() |
19 | { |
20 | local modfile |
21 | local modules_list |
22 | |
23 | # location of the modules.autoload file |
24 | modfile="/etc/modules.autoload" |
25 | |
26 | # clear the old one |
27 | :> ${modfile} |
28 | |
29 | # needed for printing: |
30 | add_modules lp parport parport_pc usblp |
31 | |
32 | # 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 | |
36 | # 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 | |
40 | # fixme: does udev handle this already?? i think so! |
41 | # special agp and drm modules needed by some graphic drivers |
42 | evaluate_table_xml cfg_graphic |
43 | case ${cfg_grafic_module} in |
44 | # intel i810 needs intel-agp module to work probably |
45 | i810) add_modules intel-agp ;; |
46 | esac |
47 | } |