diff options
Diffstat (limited to 'linux-compatible-tty.conf')
-rw-r--r-- | linux-compatible-tty.conf | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/linux-compatible-tty.conf b/linux-compatible-tty.conf new file mode 100644 index 0000000..086aa50 --- /dev/null +++ b/linux-compatible-tty.conf @@ -0,0 +1,20 @@ +# This FreeBSD devd-script creates Linux-like TTY device nodes under /compat/ubuntu/dev/. +# This fixes `arduino-cli upload`. + +notify 100 { + match "system" "DEVFS"; + match "subsystem" "CDEV"; + match "type" "CREATE"; + match "cdev" "cuaU[0-9]+"; + + action "ln -s $cdev /compat/ubuntu/dev/`echo $cdev | sed 's/^cuaU/ttyACM/'`"; +}; + +notify 100 { + match "system" "DEVFS"; + match "subsystem" "CDEV"; + match "type" "DESTROY"; + match "cdev" "cuaU[0-9]+"; + + action "rm /compat/ubuntu/dev/`echo $cdev | sed 's/^cuaU/ttyACM/'`"; +}; |