Sample Header Ad - 728x90

ppp options.tty serial by-id

0 votes
0 answers
63 views
When my machine reboots it's a lottery which USB devices get assigned to which ttyUSBn. Therefore I have to rename /etc/ppp/options.ttyUSB0 periodically. I've tried /etc/ppp/options.usb-FTDI_FT232R_USB_UART_00000000-if00-port0 but that doesn't work. Is there a way of doing it? All I can think of is a cron @reboot job for root
#!/bin/sh
tty=$(ls -l /dev/serial/by-id | grep FTDI | cut -d '/' -f 3)
cp /etc/ppp/options.usb-FTDI_FT232R_USB_UART_00000000-if00-port0 "/dev/ppp/options.$(tty)"
```
Asked by Richard Barraclough (550 rep)
Mar 20, 2023, 11:40 AM