From mboxrd@z Thu Jan 1 00:00:00 1970 From: Farkas Levente Date: Thu, 03 Jul 2008 20:54:31 +0000 Subject: Re: udev problem with udevsettle Message-Id: <486D3C87.4040207@lfarkas.org> List-Id: References: <486CD00A.3040800@lfarkas.org> In-Reply-To: <486CD00A.3040800@lfarkas.org> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: linux-hotplug@vger.kernel.org Bryan Kadzban wrote: > You shouldn't call cryptsetup from the udev RUN key. From the udev(7) > manpage: > >> RUN >> <...> This can only be used for very short running tasks. Running an >> event process for a long period of time may block all further events >> for this or a dependent device. Long running tasks need to be >> immediately detached from the event process itself. > > When your RUN rule is executed, udev is in the middle of processing the > uevent for the USB storage device. So while your script is running, > udev has not settled (the test that udevsettle uses to decide this will > never succeed, because the RUN rule that called udevsettle is not > finished). To get the rule to finish processing, the program that RUN > ran needs to exit. *Then* udevsettle will finish. yes i see it, but anyway what does the "very short running tasks" means? my scripts is about a second (under normal circumstances) which is imho very short from a shell script:-) > It probably makes the most sense to just make your script run most of > its logic in the background, instead of the foreground. I'm not sure > exactly what logic udevd uses, but I think it will work to write a > wrapper script that just runs your current script in the background: yes i already solve it, but imho it's not a good habit to call udevsettle from cryptsetup. -- Levente "Si vis pacem para bellum!"