From: Faiyaz Ahmed Date: Wed, 30 Jan 2008 20:46:03 +0000 (+0000) Subject: possible fix for rmmod floppy hanging before kexec on nodes without drives. X-Git-Tag: bootcd-3.4-3~2 X-Git-Url: http://git.onelab.eu/?a=commitdiff_plain;h=1bf419277d8f5c7a40ad85b9421997828a550387;p=bootcd.git possible fix for rmmod floppy hanging before kexec on nodes without drives. --- diff --git a/conf_files/pl_hwinit b/conf_files/pl_hwinit index 2bda27c..b133cfb 100755 --- a/conf_files/pl_hwinit +++ b/conf_files/pl_hwinit @@ -8,8 +8,11 @@ import time loadedmodules = None -def modprobe(module): - ret = os.system("/sbin/modprobe %s" % module) +def modprobe(module, args = None): + if args: + ret = os.system("/sbin/modprobe %s %s" % (module, args)) + else: + ret = os.system("/sbin/modprobe %s" % module) if os.WEXITSTATUS(ret) == 0: globals()['loadedmodules'].write("%s\n" % module) return True @@ -68,7 +71,7 @@ def main(argv): modprobe("usb_storage") print "pl_hwinit: loading floppy device driver" - modprobe("floppy") + modprobe("floppy","floppy=0,allowed_drive_mask") # always wait a bit between loading the usb drivers, and checking /sys/ # for usb devices (this isn't necessarily for waiting for mass storage files,