Magellan Linux

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 474 - (show annotations) (download) (as text)
Fri Jun 6 23:31:00 2008 UTC (15 years, 10 months ago) by niro
File MIME type: application/x-sh
File size: 1365 byte(s)
-using xml variant of evaluate_tables()

1 # $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 # 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 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
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 }