hi fabian, On Fri, Dec 06, 2002 at 10:01:04PM +0100, Fabian Franz wrote: > A small patch for hwsetup ... Yes, I know bash-fiddling is not nice, but was > easiest and you can get the idea ... ;-) :) > And an idea how to automate this in knoppix-autoconfig, without rewriting the > whole script: > > Just add a stub function to the beginning and it'll work: > > insmod() > { > /sbin/insmod $* > STATUS=$? > if [ $STATUS -eq 0 ]; > then > echo "$*">>/etc/modules.tmpl > true > else > false > fi > } > > It'll only add it, when the insmod was successful ... have you tested your insmod wrapper? i doubt that this kind of wrapper will work. # strace -f -o/tmp/out hwsetup -n -p # grep insmod /tmp/out | wc -l 0 # grep modprobe /tmp/out 14653 execve("/sbin/modprobe", ["/sbin/modprobe", "parport_pc"], [/* 11 vars */] <unfinished ...> 14655 execve("/sbin/modprobe", ["/sbin/modprobe", "-r", "parport_pc"], [/* 11 vars */]) = 0 14657 execve("/sbin/modprobe", ["/sbin/modprobe", "ide-probe-mod"], [/* 11 vars */]) = 0 14657 write(2, "modprobe: ", 10) = 10 14658 execve("/sbin/modprobe", ["/sbin/modprobe", "ide-probe"], [/* 11 vars */]) = 0 14658 write(2, "modprobe: ", 10) = 10 i fear the solution is more complex than you thought of. in my opinion there is only one solution: parsing /proc/modules and modifying /etc/modutils/* . maybe hwsetup can be extended by a --print-used-modules option. regards oliver -- Oliver Zendel LinuxTag-Team email: zendel@linuxtag.de phone: +49-631-3109371 http://www.linuxtag.de/ fax: +49-631-3109372
Attachment:
pgpSn1GnY4QAW.pgp
Description: PGP signature