# $Id$ # configures printing on the host via mysql db settings # Note must be the first configure script which will be startet add_module() { local module="$1" local arg="$2" if [[ -n $(find /lib/modules/$(uname -r) -name ${module}.[o,k]*) ]] then if [[ -z ${arg} ]] then addconfig "${module}" else addconfig "${module} ${arg}" fi fi } config_modules() { local all_ids local i local CONFIG # first of all ids all_ids=$(mysqldo "select id from cfg_modules where serial='${ALX_SERIAL}'") # get network module evaluate_table cfg_network # get graphic module evaluate_table cfg_graphic # location of the modules.autoload file CONFIG="/etc/modules.autoload" # clear the old one clearconfig # needed for printing: add_module lp add_module parport add_module parport_pc add_module usblp if [[ -n ${cfg_network_module} ]] then add_module "${cfg_network_module}" fi # intel i810 needs intel-agp module to work probably case ${cfg_graphic_module} in i810) add_module intel-agp ;; intel) add_module intel-agp ;; esac for i in ${all_ids} do evaluate_table cfg_modules "where serial='${ALX_SERIAL}' and id='${i}'" if [[ -n ${cfg_modules_module} ]] then add_module "${cfg_modules_module}" "${cfg_modules_arg}" fi done }