Annotation of /alx-src/trunk/tinyalxconfig-ng/functions/config_modules.sh
Parent Directory | Revision Log
Revision 474 -
(hide annotations)
(download)
(as text)
Fri Jun 6 23:31:00 2008 UTC (15 years, 11 months ago) by niro
File MIME type: application/x-sh
File size: 1365 byte(s)
Fri Jun 6 23:31:00 2008 UTC (15 years, 11 months ago) by niro
File MIME type: application/x-sh
File size: 1365 byte(s)
-using xml variant of evaluate_tables()
1 | niro | 474 | # $Header: /home/cvsd/alx-cvs/alx-src/tinyalxconfig-ng/functions/config_modules.sh,v 1.5 2008-06-06 23:31:00 niro Exp $ |
2 | niro | 386 | # configures printing on the host via mysql db settings |
3 | # Note must be the first configure script which will be startet | ||
4 | |||
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 | add_modules lp parport parport_pc | ||
31 | |||
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 | } |