From: Frank Mori Hess Date: Mon, 16 Feb 2004 14:02:19 +0000 (+0000) Subject: Update from Bernd Porr. Sleeps only if the file is not there. X-Git-Tag: r0_7_22~74 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=6ea1735e6e934c76674fae4edf1ff1afb4928915;p=comedilib.git Update from Bernd Porr. Sleeps only if the file is not there. --- diff --git a/etc/hotplug/usb/usbdux/usbdux b/etc/hotplug/usb/usbdux/usbdux index 1ce7210..0e467a8 100755 --- a/etc/hotplug/usb/usbdux/usbdux +++ b/etc/hotplug/usb/usbdux/usbdux @@ -32,7 +32,17 @@ fi # in 2.6 there might be a race condition between # the usbdevfs and this hotplug script. # Therefore we wait a bit to make sure that /proc/bus/usb/... is there. +if ! [ -e $DEVICE ]; then sleep 1 +fi +# +# If the device is still not existing probably the usbdevfs hasn't been +# mounted. +if ! [ -e $DEVICE ]; then + echo "usbdux hotplug: /proc/bus/usb/... does not exist" + echo "Please make sure that usbdevfs is mounted." + exit 1 +fi # # # firmware upload into the usb device