Cannot run a program at boot that uses a serial device

Oliver Grawert ogra at ubuntu.com
Sat Oct 20 08:08:08 UTC 2018


hi,
Am Dienstag, den 16.10.2018, 07:46 -0400 schrieb Mark Barton:
> 
> My udev rule:
> 
> SUBSYSTEM=="tty", ATTRS{idVendor}=="0403", 
> ATTRS{idProduct}=="6001", 
> ATTRS{serial}=="A10xxxx", SYMLINK+="ttyEmon", 
> GROUP="dialout", OWNER="root"
> SUBSYSTEM=="tty", KERNEL=="ttyEmon", 
> TAG+="systemd", 
> ENV{SYSTEMD_WANTS}+="home-energy.service"
> 

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"

(if your script actually needs the symlink create this as a searate
rule with a higher number prefix than the one creating the link)

ciao
	oli
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 181 bytes
Desc: This is a digitally signed message part
URL: <https://lists.ubuntu.com/archives/ubuntu-users/attachments/20181020/650251b3/attachment.sig>


More information about the ubuntu-users mailing list