From: Michael Prokop Date: Thu, 21 Feb 2013 09:57:01 +0000 (+0100) Subject: Run blkid under timeout command as well when accessing floppy device X-Git-Tag: v0.10.2~1 X-Git-Url: http://git.grml.org/?p=grml-autoconfig.git;a=commitdiff_plain;h=a1526917cb7ba6e7cf8ae5334310123ba6d8fae6;hp=eb7a7cc4f2e1e6d7b2ce53f40c1278e267589f0a Run blkid under timeout command as well when accessing floppy device The floppy device support could probably go away anyway, but at least until after the stable release let's keep it... Thanks: Florian Apolloner for bugreport and testing --- diff --git a/autoconfig.functions b/autoconfig.functions index 69075bf..cacd5b9 100755 --- a/autoconfig.functions +++ b/autoconfig.functions @@ -1585,9 +1585,9 @@ else eindent # We do need the following fix so floppy disk is available to blkid in any case :-/ if [ -r /dev/fd0 ] ; then - einfo "Floppy device detected. Trying to access floppy disk." + einfo "Floppy device detected. Trying to access floppy disk (this might take a few seconds)." if timeout 4 dd if=/dev/fd0 of=/dev/null bs=512 count=1 >>$DEBUG 2>&1 ; then - blkid /dev/fd0 >>$DEBUG 2>&1 + timeout 4 blkid /dev/fd0 >>$DEBUG 2>&1 fi fi DCSDEVICE=$(blkid -t LABEL=$GRMLCFG | head -1 | awk -F: '{print $1}')