--- trunk/magellan-initscripts/etc/rc.d/init.d/hwdetect 2008/04/10 20:16:43 706 +++ trunk/magellan-initscripts/etc/rc.d/init.d/hwdetect 2008/04/10 20:26:46 707 @@ -1,5 +1,5 @@ #!/bin/bash -# $Header: /home/cvsd/magellan-cvs/magellan-src/magellan-initscripts/etc/rc.d/init.d/hwdetect,v 1.6 2007-04-25 13:26:33 niro Exp $ +# $Header: /home/cvsd/magellan-cvs/magellan-src/magellan-initscripts/etc/rc.d/init.d/hwdetect,v 1.7 2008-04-10 20:26:46 niro Exp $ # note: must be startet before /etc/rc.d/init.d/modules !!! @@ -21,7 +21,17 @@ add_modconf() { local var="$1" - echo "${var}" >> /etc/modules.autoload.d/kernel-$(kernel_major_version) || die "add_modconf() adding \$var" + local config + + # get the right config + if [[ -f /etc/modules.autoload ]] + then + config=/etc/modules.autoload + else + config=/etc/modules.autoload.d/kernel-$(kernel_major_version) + fi + + echo "${var}" >> ${config} } write_x11_config() @@ -443,6 +453,12 @@ echo > /etc/modules.autoload.d/kernel-$(kernel_major_version) evaluate_retval fi + if [ -f /etc/modules.autoload ] + then + echo -e ${COLOREDSTAR}"Cleaning up /etc/modules.autoload ..." + echo > /etc/modules.autoload + evaluate_retval + fi # load module for parallel printing if exists if [ -e /lib/modules/$(uname -r)/kernel/drivers/char/lp.o ]