Cannot run a program at boot that uses a serial device

Mark Barton mark at atldes.com
Sat Oct 20 11:24:16 UTC 2018


On 10/20/18 6:38 AM, Colin Watson wrote:
> On Sat, Oct 20, 2018 at 10:08:08AM +0200, Oliver Grawert wrote:
>> why waste cycles to systemd here, just use a RUN= statement in the udev
>> rule:
>>   
>> SUBSYSTEM=="tty",
>> ATTRS{idVendor}=="0403",
>> ATTRS{idProduct}=="6001",
>> ATTRS{serial}=="A10xxxx",
>> RUN+="/usr/local/bin/home-energy.py"
> That only works if home-energy.py has a brief runtime.  I had the
> impression (perhaps wrongly) that it was a long-running process.
>
Yes it cranks up at boot time and stays running 
forever. It reads an energy monitoring devices and 
sends data to a MQTT broker. I actually have 
several of these programs connected to difference 
devices.

I plan to upgrade to 18.04 soon and will explore 
why I cannot get the systemd "wait on serial" to 
work if the problem persists.

Thanks for the info.

Mark





More information about the ubuntu-users mailing list