Magellan Linux

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

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

revision 386 by niro, Wed Jun 4 16:47:56 2008 UTC revision 393 by niro, Wed Jun 4 18:12:29 2008 UTC
# Line 1  Line 1 
1  # $Header: /home/cvsd/alx-cvs/alx-src/tinyalxconfig-ng/functions/config_modules.sh,v 1.1 2008-06-04 16:47:56 niro Exp $  # $Header: /home/cvsd/alx-cvs/alx-src/tinyalxconfig-ng/functions/config_modules.sh,v 1.2 2008-06-04 18:12:29 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    
 kernel_major_version()  
 {  
  local KV  
  KV="$(uname -r | cut -d. -f1-2)"  
  echo "${KV}"  
 }  
   
5  get_modules_settings()  get_modules_settings()
6  {  {
7   local i count mod_ids settings   local i count mod_ids settings
# Line 41  get_modules_settings() Line 34  get_modules_settings()
34  add_modules()  add_modules()
35  {  {
36   local modules="$@"   local modules="$@"
37   local modfile="/etc/modules.autoload.d/kernel-$(kernel_major_version)"   local modfile="/etc/modules.autoload"
38   local mod   local mod
39    
40   for mod in ${modules}   for mod in ${modules}
41   do   do
42   [ -n "$(find /lib/modules/$(uname -r) -name ${mod}.[o,k]*)" ] && \   [[ -n $(find /lib/modules/$(uname -r) -name ${mod}.[o,k]*) ]] && \
43   echo "${mod}" >> ${modfile}   echo "${mod}" >> ${modfile}
44   done   done
45  }  }
# Line 60  config_modules() Line 53  config_modules()
53   get_modules_settings   get_modules_settings
54    
55   # location of the modules.autoload file   # location of the modules.autoload file
56   modfile="/etc/modules.autoload.d/kernel-$(kernel_major_version)"   modfile="/etc/modules.autoload"
57    
58   # clear the old one   # clear the old one
59   :> ${modfile}   :> ${modfile}
# Line 68  config_modules() Line 61  config_modules()
61   # needed for printing:   # needed for printing:
62   add_modules lp parport parport_pc   add_modules lp parport parport_pc
63    
64   [ -n "${ALX_NETWORK_MODULE}" ] && \   [[ -n ${ALX_NETWORK_MODULE} ]] && \
65   echo "${ALX_NETWORK_MODULE}" >> ${modfile}   echo "${ALX_NETWORK_MODULE}" >> ${modfile}
66    
67   # intel i810 needs intel-agp module to work probably   # intel i810 needs intel-agp module to work probably
# Line 76  config_modules() Line 69  config_modules()
69    
70   for ((i=0; i <= ALX_COUNT; i++))   for ((i=0; i <= ALX_COUNT; i++))
71   do   do
72   [ -n "${ALX_MODULES[${i}]}" ] && \   [[ -n ${ALX_MODULES[${i}]} ]] && \
73   echo "${ALX_MODULES[${i}]}" >> ${modfile}   echo "${ALX_MODULES[${i}]}" >> ${modfile}
74   done   done
75    

Legend:
Removed from v.386  
changed lines
  Added in v.393