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 331 by niro, Thu Sep 1 23:58:43 2005 UTC revision 332 by niro, Wed Sep 14 21:08:34 2005 UTC
# Line 1  Line 1 
1  # $Header: /home/cvsd/alx-cvs/alx-src/alxconfig-ng/functions/config_modules.sh,v 1.3 2005-09-01 23:58:43 niro Exp $  # $Header: /home/cvsd/alx-cvs/alx-src/alxconfig-ng/functions/config_modules.sh,v 1.4 2005-09-14 21:08:34 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    
5  kernel_major_version()  kernel_major_version()
6  {  {
7   local KV   local KV
8   KV="$(uname -r|cut -d. -f1-2)"   KV="$(uname -r | cut -d. -f1-2)"
9   echo "${KV}"   echo "${KV}"
10  }  }
11    
# Line 43  get_modules_settings() Line 43  get_modules_settings()
43   export ALX_MODULES   export ALX_MODULES
44  }  }
45    
46    add_modules()
47    {
48     local modules="$@"
49     local modfile="/etc/modules.autoload.d/kernel-$(kernel_major_version)"
50     local mod
51    
52     for mod in ${modules}
53     do
54     [ -n "$(find /lib/modules/$(uname -r) -name ${mod}.[o,k]*)" ] && \
55     echo "${mod}" >> ${modfile}
56     done
57    }
58    
59  config_modules()  config_modules()
60  {  {
61   local i   local i
# Line 54  config_modules() Line 67  config_modules()
67   # location of the modules.autoload file   # location of the modules.autoload file
68   modfile="/etc/modules.autoload.d/kernel-$(kernel_major_version)"   modfile="/etc/modules.autoload.d/kernel-$(kernel_major_version)"
69    
70   # write default settings:   # needed for printing:
71   echo "lp" > ${modfile}   add_modules lp parport parport_pc
72    
73   [ -n "${ALX_NETWORK_MODULE}" ] && \   [ -n "${ALX_NETWORK_MODULE}" ] && \
74   echo "${ALX_NETWORK_MODULE}" >> ${modfile}   echo "${ALX_NETWORK_MODULE}" >> ${modfile}
75    
76   # intel i810 needs intel-agp module to work probably   # intel i810 needs intel-agp module to work probably
77   [[ ${ALX_GFX_MODULE} = i810 ]] && \   [[ ${ALX_GFX_MODULE} = i810 ]] && add_modules intel-agp
  [ -f /lib/modules/$(uname -r)/kernel/drivers/char/agp/intel-agp.ko ] && \  
  echo "intel-agp" >> ${modfile}  
78    
79   for ((i=0; i <= ALX_COUNT; i++))   for ((i=0; i <= ALX_COUNT; i++))
80   do   do

Legend:
Removed from v.331  
changed lines
  Added in v.332