[systemd-devel] Can udev assist?
Aaron_Wright at selinc.com
Aaron_Wright at selinc.com
Fri Nov 20 09:48:20 PST 2015
Andrei Borzenkov <arvidjaar at gmail.com> wrote on 11/20/2015 09:40:35 AM:
> 20.11.2015 20:08, Aaron_Wright at selinc.com пишет:
> > I have a script that creates a partition (using pyparted) and then
tries
> > to format it (using mkfs.ext4). Most of the time this works OK.
However,
> > sometimes the format fails because it can't find the device. There
seems
> > to be a race condition due to a delay between creating a partition and
the
> > device node in /dev being created.
> > Is there a tool in udev or udevadm that can help my script know when
it
> > safe to proceed?
> >
>
> If you want to be on safe side, the only safe way is probably to listen
> to kernel or udev events and wait until events for partitions appear.
That what I was thinking, but I'm not super familiar with kernel or udev
events, so I just wanted to put out a feeler to see if there was something
that udev already did that I could use. Like "udevadm <something>".
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/systemd-devel/attachments/20151120/e3a3126f/attachment.html>
More information about the systemd-devel
mailing list