Annotation of /alx-src/branches/alxconf-060/functions/config_modules.sh
Parent Directory | Revision Log
Revision 2151 -
(hide annotations)
(download)
(as text)
Tue May 17 21:32:32 2011 UTC (13 years, 4 months ago) by niro
File MIME type: application/x-sh
File size: 1275 byte(s)
Tue May 17 21:32:32 2011 UTC (13 years, 4 months ago) by niro
File MIME type: application/x-sh
File size: 1275 byte(s)
-fixed a typo
1 | niro | 1971 | # $Id$ |
2 | niro | 256 | # configures printing on the host via mysql db settings |
3 | # Note must be the first configure script which will be startet | ||
4 | |||
5 | niro | 2146 | add_module() |
6 | niro | 256 | { |
7 | niro | 2146 | local module="$1" |
8 | local arg="$2" | ||
9 | niro | 256 | |
10 | niro | 2146 | if [ -n "$(find /lib/modules/$(uname -r) -name ${mod}.[o,k]*)" ] |
11 | then | ||
12 | if [[ -z ${arg} ]] | ||
13 | niro | 1646 | then |
14 | niro | 2146 | addconfig "${module}" |
15 | else | ||
16 | addconfig "${mod} ${arg}" | ||
17 | niro | 1646 | fi |
18 | niro | 2151 | fi |
19 | niro | 332 | } |
20 | |||
21 | niro | 2146 | config_modules() |
22 | niro | 1721 | { |
23 | niro | 2146 | local all_ids |
24 | niro | 1721 | local i |
25 | niro | 2146 | local CONFIG |
26 | niro | 1721 | |
27 | niro | 2146 | # first of all ids |
28 | all_ids=$(mysqldo "select id from cfg_modules where serial='${ALX_SERIAL}'") | ||
29 | niro | 2121 | |
30 | niro | 2146 | # get network module |
31 | evaluate_table cfg_network | ||
32 | niro | 1721 | |
33 | niro | 2146 | # get graphic module |
34 | evaluate_table cfg_graphic | ||
35 | niro | 256 | |
36 | niro | 318 | # location of the modules.autoload file |
37 | niro | 2146 | CONFIG="/etc/modules.autoload" |
38 | niro | 318 | |
39 | niro | 334 | # clear the old one |
40 | niro | 2146 | clearconfig |
41 | niro | 334 | |
42 | niro | 332 | # needed for printing: |
43 | niro | 2146 | add_module lp |
44 | add_module parport | ||
45 | add_module parport_pc | ||
46 | add_module usblp | ||
47 | niro | 332 | |
48 | niro | 2146 | if [[ -n ${cfg_network_module} ]] |
49 | niro | 1646 | then |
50 | niro | 2146 | add_module "${cfg_network_module}" |
51 | niro | 1646 | fi |
52 | niro | 256 | |
53 | niro | 318 | # intel i810 needs intel-agp module to work probably |
54 | niro | 2146 | case ${cfg_graphic_module} in |
55 | i810) add_module intel-agp ;; | ||
56 | intel) add_module intel-agp ;; | ||
57 | esac | ||
58 | niro | 318 | |
59 | niro | 2146 | for i in ${all_ids} |
60 | niro | 1646 | do |
61 | niro | 2146 | evaluate_table cfg_modules "where serial='${ALX_SERIAL}' and id='${i}'" |
62 | if [[ -n ${cfg_modules_module} ]] | ||
63 | niro | 1646 | then |
64 | niro | 2146 | add_module "${cfg_modules_module}" "${cfg_modules_arg}" |
65 | niro | 1646 | fi |
66 | niro | 256 | done |
67 | } |