Hello Giuseppe,
from my point of view all we need is a logical OR (||) in this systemd unit. 
Unfortunately I couldn't find such an option in systemd's manpages. So, I gave 
it a shot and tried this:

[Unit]
Description=HylaFAX faxgetty %I
BindsTo=iaxmodem.service || dev-%i.device
After=network.target

Well, it works as expected: The devices come up and if I stop iaxmodem.service 
manually, all faxgetty services are immediately terminated as well. If I start 
faxgetty again, iaxmodem.service is started automatically. This is just for the 
iaxmodem part, I couldn't test with a real serial modem though.

The After line is to make sure iaxmodem.service is running if faxgetty wants to 
start an iax device.

But, again, I am not sure if this logical OR is officially supported by systemd.


Tino

Reply via email to