|
From: Friedrich L. <fr...@us...> - 2007-02-28 20:04:37
|
Update of /cvsroot/devil-linux/build/config/etc/initrd In directory sc8-pr-cvs12.sourceforge.net:/tmp/cvs-serv26288/config/etc/initrd Modified Files: Tag: rel-1-2-patches linuxrc Log Message: fix a possible race condition, at least in qemu one experiences one from time to time Index: linuxrc =================================================================== RCS file: /cvsroot/devil-linux/build/config/etc/initrd/linuxrc,v retrieving revision 1.70.2.17 retrieving revision 1.70.2.18 diff -u -d -r1.70.2.17 -r1.70.2.18 --- linuxrc 28 Feb 2007 00:07:00 -0000 1.70.2.17 +++ linuxrc 28 Feb 2007 20:04:29 -0000 1.70.2.18 @@ -313,7 +313,14 @@ # we unmount here to be able to possibly activate run from ram # if that's activated by the default config # (bug reported by Dmitry Komarov) - umount /cdrom + sync + let i=0 + while (! umount /cdrom 2>/dev/null) && [ $i -lt 10 ]; do + # at least in qemu there exists a race condition + # when unmounting the cdrom + let i=i+1 + sleep 1 + done # # FIXME - need to solve this in a nicer way as we search for # the cd/image twice which is quite ugly (fl) |