Magellan Linux

Diff of /alx-src/trunk/alxconfig-ng/functions/config_modules.sh

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 317 by niro, Thu Apr 14 21:24:31 2005 UTC revision 318 by niro, Thu Sep 1 18:29:56 2005 UTC
# Line 1  Line 1 
1  # $Header: /home/cvsd/alx-cvs/alx-src/alxconfig-ng/functions/config_modules.sh,v 1.1 2005-04-14 21:24:31 niro Exp $  # $Header: /home/cvsd/alx-cvs/alx-src/alxconfig-ng/functions/config_modules.sh,v 1.2 2005-09-01 18:29:56 niro Exp $
2  # configures printing on the host via mysql db settings  # configures printing on the host via mysql db settings
3  # Note must be the first configure script which will be startet  # Note must be the first configure script which will be startet
4    
# Line 32  get_modules_settings() Line 32  get_modules_settings()
32   ALX_NETWORK_MODULE=$(mysql_command ${SQL_USER} ${SQL_PASS} ${SQL_HOST} ${SQL_DB} \   ALX_NETWORK_MODULE=$(mysql_command ${SQL_USER} ${SQL_PASS} ${SQL_HOST} ${SQL_DB} \
33   "select module from cfg_network where serial=${ALX_SERIAL};")   "select module from cfg_network where serial=${ALX_SERIAL};")
34    
35     ## fixes needed to satisfy some deps
36     ALX_GFX_MODULE=$(mysql_command ${SQL_USER} ${SQL_PASS} ${SQL_HOST} ${SQL_DB} \
37     "select module from cfg_grafic where serial=${ALX_SERIAL};")
38    
39   # export all settings   # export all settings
40   export ALX_COUNT=${count}   export ALX_COUNT=${count}
41   export ALX_NETWORK_MODULE   export ALX_NETWORK_MODULE
42     export ALX_GFX_MODULE
43   export ALX_MODULES   export ALX_MODULES
44  }  }
45    
46  config_modules()  config_modules()
47  {  {
48   local i   local i
49     local modfile
50    
51   #first of all get the vars   #first of all get the vars
52   get_modules_settings   get_modules_settings
53    
54     # location of the modules.autoload file
55     modfile="/etc/modules.autoload.d/kernel-$(kernel_major_version)"
56    
57   # write default settings:   # write default settings:
58   echo "lp" > /etc/modules.autoload.d/kernel-$(kernel_major_version)   echo "lp" > ${modfile}
59   [ -n "${ALX_NETWORK_MODULE}" ] && \   [ -n "${ALX_NETWORK_MODULE}" ] && \
60   echo "${ALX_NETWORK_MODULE}" >> /etc/modules.autoload.d/kernel-$(kernel_major_version)   echo "${ALX_NETWORK_MODULE}" >> ${modfile}
61    
62     # intel i810 needs intel-agp module to work probably
63     [[ ${ALX_GFX_MODULE} = i810 ]] && \
64     [ -f /lib/modules/$(uname -r)/kernel/drivers/char/agp/intel-agp.ko ] && \
65     echo "intel-agp" >> ${modfile}
66    
67   for ((i=0; i <= ALX_COUNT; i++))   for ((i=0; i <= ALX_COUNT; i++))
68   do   do
69   [ -n "${ALX_MODULES[${i}]}" ] && \   [ -n "${ALX_MODULES[${i}]}" ] && \
70   echo "${ALX_MODULES[${i}]}" >> /etc/modules.autoload.d/kernel-$(kernel_major_version)   echo "${ALX_MODULES[${i}]}" >> ${modfile}
   
71   done   done
72    
73   unset ALX_COUNT   unset ALX_COUNT
74   unset ALX_MODULES   unset ALX_MODULES
75   unset ALX_NETWORK_MODULE   unset ALX_NETWORK_MODULE
76     unset ALX_GFX_MODULE
77  }  }

Legend:
Removed from v.317  
changed lines
  Added in v.318