malekith: bootdisk modprobe,1.2,1.3
Michał Moskal
malekith w pld-linux.org
Wto, 23 Lip 2002, 12:55:08 CEST
log_diff.py sponsored by *pld-linux.org*
$Id: log_diff.py,v 1.32 2002/04/14 21:54:28 misiek Exp $
Module name: bootdisk
Changes by: malekith
Modified Files:
modprobe
Log Message:
- use load_module instead of insmod (it will ask user to insert addon disk)
- redirected i/o of load_module to /dev/console (cardmgr closes its fds 0,1,2)
- don't use -r option to rmmod
Index: modprobe
===================================================================
RCS file: /cvsroot/bootdisk/scripts/modprobe,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- modprobe 6 Sep 2001 23:50:22 -0000 1.2
+++ modprobe 23 Jul 2002 10:55:02 -0000 1.3
@@ -14,15 +14,22 @@
mod=`echo "$1" | sed 's/\.o$//' || :`
if test $remove; then
- rmmod -r ${mod}
-
+ # don't use rmmod -r option -- busybox' rmmod lacks it
+ rmmod ${mod}
else
deps=`grep "^${mod}\.o:" /etc/modules.dep | sed "s/^${mod}\.o://" || :`
# love recursion
for i in $deps; do modprobe $i; done
- lsmod | grep -q "^${mod} " || insmod ${mod}
+ if lsmod | grep -q "^${mod} " ; then
+ : ok
+ else
+ # run load_module (that will ask user to insert disk)
+ # with redirected descriptors, as we'll be run from within
+ # cardmgr, that captures our input/output
+ load_module ${mod} < /dev/console > /dev/console 2> /dev/console
+ fi
fi
-
+# vim:ft=sh
Więcej informacji o liście dyskusyjnej pld-installer