That's very clever, but it looks like the file exists before it's usable by 
libpruio. I tried ConditionPathIsReadWrite, but the file is readwritable 
before it's usable by libpruio as well. I noticed that the file permissions 
and group changes which seems to correlate with libpruio being able to use 
the file. Unfortunately, I don't see anything in the systemd documentation 
about file owner or permission conditions in service files.

On Thursday, September 10, 2020 at 2:21:02 PM UTC-5 RobertCNelson wrote:

> On Thu, Sep 10, 2020 at 1:55 PM Andrew Harres <andrew...@gmail.com> wrote:
> >
> > Hello again!
> >
> > I'm trying to solve a minor problem. I made a systemd service which 
> starts my program automatically. My problem is that my program is starting 
> too early which causes this error:
> >
> > AssertionError: pruio_new failed (b'cannot open /dev/uio5')
> >
> >
> > The program will exit and the systemd service will keep restarting the 
> program until eventually (less than a minute) the program will run 
> successfully.
> >
> > Here is my systemd service file:
> >
> > [Unit]
> > After=generic-board-startup.service libpruio-lkm.service
> > StartLimitIntervalSec=0
> >
> > [Service]
> > Type=simple
> > Restart=always
> > User=debian
> > WorkingDirectory=/opt/rad/virtual_sensor
> > ExecStart=/opt/rad/virtual_sensor/virtual_sensor
> >
> > [Install]
> > WantedBy=multi-user.target
> >
> > I realize that since the libpruio-lkm service doesn't exit, putting it 
> in the 'after' section doesn't really make sense. Surely someone has dealt 
> with this problem before, but I couldn't find it while searching.
>
> Add this option to your service:
>
> ConditionPathExists=/dev/uio5
>
> Wish systemd had a wait for module option..
>
> Regards,
>
>
> -- 
> Robert Nelson
> https://rcn-ee.com/
>

-- 
For more options, visit http://beagleboard.org/discuss
--- 
You received this message because you are subscribed to the Google Groups 
"BeagleBoard" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to beagleboard+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/beagleboard/78f4859b-e23e-4f82-8172-622034ffb23bn%40googlegroups.com.

Reply via email to